Changeset 26736
- Timestamp:
- 12/14/21 13:28:09 (3 years ago)
- Location:
- issm/trunk-jpl/src/jl/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/jl/core/analyses/masstransportanalysis.jl
r26731 r26736 36 36 FetchDataToInput(md,inputs,elements,md.geometry.surface,SurfaceEnum) 37 37 FetchDataToInput(md,inputs,elements,md.geometry.base,BaseEnum) 38 FetchDataToInput(md,inputs,elements,md.geometry.bed,BedEnum) 38 39 FetchDataToInput(md,inputs,elements,md.basalforcings.groundedice_melting_rate./md.constants.yts,BasalforcingsGroundediceMeltingRateEnum) 39 40 FetchDataToInput(md,inputs,elements,md.basalforcings.floatingice_melting_rate./md.constants.yts,BasalforcingsFloatingiceMeltingRateEnum) … … 238 239 oldsurface = Vector{Float64}(undef,3) 239 240 phi = Vector{Float64}(undef,3) 241 bed = Vector{Float64}(undef,3) 240 242 GetInputListOnVertices!(element, newthickness, ThicknessEnum) 241 243 GetInputListOnVertices!(element, oldthickness, ThicknessOldEnum) … … 243 245 GetInputListOnVertices!(element, oldsurface, SurfaceOldEnum) 244 246 GetInputListOnVertices!(element, phi, MaskOceanLevelsetEnum) 247 GetInputListOnVertices!(element, bed, BedEnum) 245 248 sealevel = zeros(3) 246 249 newsurface = Vector{Float64}(undef,3) … … 250 253 if(phi[i]>0.) 251 254 #this is grounded ice: just add thickness to base. 252 newsurface[i] = bed[i]+newthickness[i] ;#surface = bed + newthickness253 newbase[i] = bed[i] ;#new base at new bed255 newsurface[i] = bed[i]+newthickness[i] #surface = bed + newthickness 256 newbase[i] = bed[i] #new base at new bed 254 257 else 255 258 #this is an ice shelf: hydrostatic equilibrium -
issm/trunk-jpl/src/jl/core/analyses/transientanalysis.jl
r26731 r26736 33 33 if(isstressbalance) Core(StressbalanceAnalysis(), femmodel) end 34 34 if(ismasstransport) Core(MasstransportAnalysis(), femmodel) end 35 MigrateGroundinglinex(femmodel) 35 36 36 37 step+=1 -
issm/trunk-jpl/src/jl/core/elements.jl
r26731 r26736 257 257 return sqrt(2*GetArea(element)) 258 258 end#}}} 259 function MigrateGroundingLine(element::Tria) #{{{ 260 261 h = Vector{Float64}(undef,3) 262 s = Vector{Float64}(undef,3) 263 b = Vector{Float64}(undef,3) 264 r = Vector{Float64}(undef,3) 265 phi = Vector{Float64}(undef,3) 266 sl = zeros(3) 267 GetInputListOnVertices!(element, h, ThicknessEnum) 268 GetInputListOnVertices!(element, s, SurfaceEnum) 269 GetInputListOnVertices!(element, b, BaseEnum) 270 GetInputListOnVertices!(element, r, BedEnum) 271 #GetInputListOnVertices(element, sl, SealevelEnum) 272 GetInputListOnVertices!(element, phi, MaskOceanLevelsetEnum) 273 274 275 rho_water = FindParam(element, MaterialsRhoSeawaterEnum) 276 rho_ice = FindParam(element, MaterialsRhoIceEnum) 277 density = rho_ice/rho_water 278 279 for i in 1:3 280 281 if(phi[i]<=0) 282 #reground if base is below bed 283 if(b[i]<=r[i]) 284 b[i] = r[i] 285 s[i] = b[i]+h[i] 286 end 287 else 288 bed_hydro=-density*h[i]+sl[i]; 289 if (bed_hydro>r[i]) 290 #Unground only if the element is connected to the ice shelf 291 s[i] = (1-density)*h[i]+sl[i] 292 b[i] = -density*h[i]+sl[i] 293 end 294 end 295 296 #recalculate phi 297 phi[i]=h[i]+(r[i]-sl[i])/density 298 end 299 300 #Update inputs 301 AddInput(element,MaskOceanLevelsetEnum,phi,P1Enum) 302 AddInput(element,SurfaceEnum,s,P1Enum) 303 AddInput(element,BaseEnum,b,P1Enum) 304 305 end#}}} 259 306 260 307 #Finite Element stuff -
issm/trunk-jpl/src/jl/core/modules.jl
r26731 r26736 313 313 end 314 314 end# }}} 315 function MigrateGroundinglinex(femmodel::FemModel)# {{{ 316 317 for i=1:length(femmodel.elements) 318 MigrateGroundingLine(femmodel.elements[i]) 319 end 320 321 end# }}}
Note:
See TracChangeset
for help on using the changeset viewer.