Changeset 26766
- Timestamp:
- 01/11/22 11:58:04 (3 years ago)
- Location:
- issm/trunk-jpl/src/jl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/jl/core/analyses/stressbalanceanalysis.jl ¶
r26738 r26766 50 50 if typeof(md.friction)==BuddFriction 51 51 FetchDataToInput(md,inputs,elements,md.friction.coefficient,FrictionCoefficientEnum) 52 elseif typeof(md.friction)==WeertmanFriction 53 FetchDataToInput(md,inputs,elements,md.friction.C,FrictionCEnum) 54 FetchDataToInput(md,inputs,elements,md.friction.m,FrictionMEnum) 52 55 else 53 56 error("Friction ", typeof(md.friction), " not supported yet") … … 64 67 if typeof(md.friction)==BuddFriction 65 68 AddParam(parameters, 1, FrictionLawEnum) 69 elseif typeof(md.friction)==WeertmanFriction 70 AddParam(parameters, 2, FrictionLawEnum) 66 71 else 67 72 error("Friction ", typeof(md.friction), " not supported yet") -
TabularUnified issm/trunk-jpl/src/jl/core/friction.jl ¶
r26705 r26766 10 10 g::Float64 11 11 end# }}} 12 struct CoreWeertmanFriction#{{{ 13 c_input::ElementInput 14 m_input::ElementInput 15 vx_input::ElementInput 16 vy_input::ElementInput 17 end# }}} 18 12 19 function CoreFriction(element::Tria) #{{{ 13 20 … … 24 31 25 32 return CoreBuddFriction(H_input, b_input, c_input, rho_ice, rho_water, g) 33 elseif frictionlaw==2 34 c_input = GetInput(element, FrictionCEnum) 35 m_input = GetInput(element, FrictionMEnum) 36 vx_input = GetInput(element, VxEnum) 37 vy_input = GetInput(element, VyEnum) 38 return CoreWeertmanFriction(c_input,m_input,vx_input,vy_input) 26 39 else 27 40 error("Friction ",typeof(md.friction)," not supported yet") … … 42 55 return c^2*N 43 56 end #}}} 57 58 function Alpha2(friction::CoreWeertmanFriction, gauss::GaussTria, i::Int64)#{{{ 59 c = GetInputValue(friction.c_input, gauss, i) 60 m = GetInputValue(friction.m_input, gauss, i) 61 vx = GetInputValue(friction.vx_input, gauss, i) 62 vy = GetInputValue(friction.vy_input, gauss, i) 63 64 if sqrt(vx^2+vy^2)==0 && m<1 65 return 0 66 else 67 return c^2*sqrt(vx^2+vy^2)^(m-1) 68 end 69 end#}}} -
TabularUnified issm/trunk-jpl/src/jl/issm.jl ¶
r26725 r26766 7 7 8 8 include("usr/classes.jl") 9 export model 9 export model, WeertmanFriction 10 10 include("usr/exp.jl") 11 11 export expread, ContourToNodes -
TabularUnified issm/trunk-jpl/src/jl/usr/classes.jl ¶
r26730 r26766 141 141 m::Vector{Float64} 142 142 end 143 function WeertmanFriction() #{{{ 144 return WeertmanFriction(Vector{Float64}(undef,0),Vector{Float64}(undef,0)) 145 end# }}} 146 function Base.show(io::IO, this::WeertmanFriction)# {{{ 147 IssmStructDisp(io, this) 148 end# }}} 143 149 # }}} 144 150 #Basalforcings {{{
Note:
See TracChangeset
for help on using the changeset viewer.