Dear developers,
I hope you’re doing well. I have successfully set up a 2D model with a ‘box with lithosphere’ model and am working on extending the same boundary conditions to a 3D box model shown below.
My velocity boundaries setup are shown below:
subsection Boundary velocity model
set Prescribed velocity boundary indicators = 4 z: function, 6 x: function, 7 x: function
subsection Function
set Variable names = x,y,z
set Function constants = vx_top=0.05, vx_bot=0.0, vy_top=0, vy_bot=0; vz_bot=0.0, vz_top=0.0, x0=1320e3,y0=1320e3, r_p=200e3, rho_m=3400, alpha=3e-5, g=9.8, delta_T=250, eta0=1e21, readj=11.4524e-4,gamma=3.1
set Function expression = if(z==0e3, vx_bot, vx_top);0;if(z==0e3,if(((x-x0)^2+(y-y0)^2)<r_p^2,0.18,0),vz_top)
end
end
However, errors occurred when I tried to run the model above:
ERROR: FunctionParser failed to parse
'Boundary velocity model.Function'
with expression
'if(z==0e3, vx_bot, vx_top);0;if(z==0e3,if(((x-x0)^2+(y-y0)^2)<r_p^2,0.18,0),vz_top)'More information about the cause of the parse error
is shown below.
An error occurred in line <128> of file </home/mazq/software/aspect/tmp/unpack/deal.II-v9.4.0/source/base/parsed_function.cc> in function
void dealii::Functions::ParsedFunction<dim>::parse_parameters(dealii::ParameterHandler&) [with int dim = 3]
The violated condition was:
this_c.size() == 2
Additional information:
Invalid format
Stacktrace:
-----------
#0 /home/mazq/software/aspect/deal.II-v9.4.0/lib/libdeal_II.g.so.9.4.0: dealii::Functions::ParsedFunction<3>::parse_parameters(dealii::ParameterHandler&)
#1 /home/mazq/software/aspect/aspect/build/aspect: aspect::BoundaryVelocity::Function<3>::parse_parameters(dealii::ParameterHandler&)
#2 /home/mazq/software/aspect/aspect/build/aspect: aspect::BoundaryVelocity::Manager<3>::parse_parameters(dealii::ParameterHandler&)
#3 /home/mazq/software/aspect/aspect/build/aspect: aspect::Simulator<3>::Simulator(ompi_communicator_t*, dealii::ParameterHandler&)
#4 /home/mazq/software/aspect/aspect/build/aspect: void run_simulator<3>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool, bool)
#5 /home/mazq/software/aspect/aspect/build/aspect: main
--------------------------------------------------------
Aborting!
----------------------------------------------------
Could you please help me check where went wrong? I would greatly appreciate it!
Cheers,
Ziqi