[aspect-devel] The syntax for the function expression

Nan Zhang Nan.Zhang at colorado.edu
Sun Sep 11 03:53:05 PDT 2016


Hi all,


When I use function expression in my material model like:

*****************************************

subsection Material model

  set Model name = depth dependent



  subsection Depth dependent model

    set Base model = simple

    set Depth dependence method = Function



    subsection Viscosity depth function

      set Variable names      = r,phi,theta

      set Function expression = if( r>5670000, 5e21, 2e22 )

      #set Function expression = if( r>5670000, 5e21,
(1e22*(22.72-8*r/2189e3)) )

    end

  end

  subsection Simple model

    set Thermal expansion coefficient = 4e-5

    set Viscosity                     = 1e22

    set Thermal viscosity exponent = 8.0   #following 1 2 3

    set Reference temperature = 1600

    set Density differential for compositional field 1 = 165

  end

end

*****************************************



I got error report like:

*****************************************

FunctionParser failed to parse

FunctionParser failed to parse

FunctionParser failed to parse

         Viscosity depth function

         Viscosity depth function

with expression

with expression

         Viscosity depth function

FunctionParser failed to parse

with expression

FunctionParser failed to parse

FunctionParser failed to parse

        '       '        Viscosity depth function

        '        Viscosity depth function

with expression

with expression

if( r>5670000, 5e21, 2e22 )     ' 'FunctionParser failed to parse

*****************************************



I looked at source code like some thing “viscosity_function.parse_parameters
(prm);”. It is the same as other function expression as in “Compositional
initial conditions”. I could do the function expression in “Compositional
initial conditions”, but failed in “set Depth dependence method = Function”?
How to check the syntax difference between the "Viscosity depth function"
and "Compositional initial conditions"?



Cheers,
Nan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20160911/b283423f/attachment.html>


More information about the Aspect-devel mailing list