Changeset 26766


Ignore:
Timestamp:
01/11/22 11:58:04 (3 years ago)
Author:
jwilner
Message:

NEW: added Weertman friction law

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  
    5050        if typeof(md.friction)==BuddFriction
    5151                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)
    5255        else
    5356                error("Friction ", typeof(md.friction), " not supported yet")
     
    6467        if typeof(md.friction)==BuddFriction
    6568                AddParam(parameters, 1, FrictionLawEnum)
     69        elseif typeof(md.friction)==WeertmanFriction
     70                AddParam(parameters, 2, FrictionLawEnum)
    6671        else
    6772                error("Friction ", typeof(md.friction), " not supported yet")
  • TabularUnified issm/trunk-jpl/src/jl/core/friction.jl

    r26705 r26766  
    1010        g::Float64
    1111end# }}}
     12struct CoreWeertmanFriction#{{{
     13   c_input::ElementInput
     14        m_input::ElementInput
     15        vx_input::ElementInput
     16        vy_input::ElementInput
     17end# }}}
     18
    1219function CoreFriction(element::Tria) #{{{
    1320
     
    2431
    2532                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)
    2639        else
    2740                error("Friction ",typeof(md.friction)," not supported yet")
     
    4255        return c^2*N
    4356end #}}}
     57
     58function 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
     69end#}}}
  • TabularUnified issm/trunk-jpl/src/jl/issm.jl

    r26725 r26766  
    77
    88include("usr/classes.jl")
    9 export model
     9export model, WeertmanFriction
    1010include("usr/exp.jl")
    1111export expread, ContourToNodes
  • TabularUnified issm/trunk-jpl/src/jl/usr/classes.jl

    r26730 r26766  
    141141        m::Vector{Float64}
    142142end
     143function WeertmanFriction() #{{{
     144        return WeertmanFriction(Vector{Float64}(undef,0),Vector{Float64}(undef,0))
     145end# }}}
     146function Base.show(io::IO, this::WeertmanFriction)# {{{
     147   IssmStructDisp(io, this)
     148end# }}}
    143149# }}}
    144150#Basalforcings {{{
Note: See TracChangeset for help on using the changeset viewer.