A problem on using Prescribed Internal Velocity

In the subduction model I want to constrain the velocity inside the model, and I falsed.


I need some help to solve the problem, and this is my aspect input file. Without the prescribed velocity partion it runs correctly.
set Output directory = output
set Use years in output instead of seconds=true
set World builder file = /data3/Changs/inputpara/47ridgesub-wb.wb
set Dimension = 2
set CFL number = 0.1
set End time = 4e6
set Pressure normalization =no
set Max nonlinear iterations = 100
set Nonlinear solver tolerance = 1e-4
set Nonlinear solver scheme=single Advection, iterated Stokes
set Resume computation= auto

set Additional shared libraries= /home/dealii/aspect/cookbooks/prescribed_velocity/libprescribed_velocity.so

set Prescribe internal velocities= true

subsection Prescribed velocities
subsection Indicator function
set Variable names=x,y,t
set Function expression = if(((x<950e3) & (x>700e3) & (y>580e3) & (y<650e3)),1,0);if(((x<950e3) & (x>700e3) & (y>580e3) & (y<650e3)),1,0)
end

subsection Velocity function
set Variable names=x,y,t
set Function expression= 0.066;-0.001
end
end

subsection Solver parameters
subsection Stokes solver parameters
set Number of cheap Stokes solver steps = 0
end
end

subsection Geometry model
set Model name = box
subsection Box
set X extent = 2000e3
set Y extent = 660e3
set X repetitions = 50
set Y repetitions = 17
end
end

subsection Material model
set Model name = visco plastic
set Material averaging = harmonic average
subsection Visco Plastic
set Reference temperature=273
set Thermal diffusivities=9.89e-7,1.21e-6,1.21e-6,1.15e-6,9.87e-7,1.21e-6,1.15e-6,9.87e-7
set Specific heats = 750.0
set Densities = 3300,3300,2800,2900,3300,3300,3300,3300
set Thermal expansivities =2e-5
set Angles of internal friction=25,10,20,20,20,22,22,25
set Cohesions=20e6,10e6,20e6,20e6,20e6,10e6,10e6,20e6
set Prefactors for diffusion creep=2.37e-15,1.e-50,1.e-50,1.e-50,2.37e-15,1.e-50,1.e-50,2.37e-15
set Prefactors for dislocation creep=6.52e-16,1.12e-10,8.57e-28,7.13e-18,6.52e-16,1.12e-10,1.12e-10,6.52e-16
set Stress exponents for dislocation creep=3.5,3.4,4.0,3.0,3.5,3.4,3.4,3.5

set Stress exponents for diffusion creep=1

set Activation energies for diffusion creep=375.e3,0,0,0,375.e3,0,0,375.e3
set Activation energies for dislocation creep=530.e3,497.e3,223.e3,345.e3,530.e3,497.e3,497.e3,530.e3
set Activation volumes for diffusion creep=4.0e-6,0,0,0,4.e-6,0,0,4.e-6
set Activation volumes for dislocation creep=13.e-6,0,0,0,18.e-6,0,0,18.e-6
set Grain size exponents for diffusion creep=3,1,1,1,3,1,1,3
set Minimum strain rate=1.e-20
set Reference strain rate=1.e-15
set Minimum viscosity=1e20
set Maximum viscosity=1e26
set Reference viscosity=1e22
set Viscosity averaging scheme= maximum composition
set Viscous flow law=composite
set Elastic shear moduli=75.0e9,50.0e9,75.0e9,75.0e9,75.0e9,100.0e9,100.e9,100.e9
end

end

subsection Compositional fields
set Number of fields = 7
end

subsection Initial composition model
set Model name = world builder
end

subsection Gravity model
set Model name = vertical
subsection Vertical
set Magnitude = 9.8
end
end

subsection Mesh refinement
set Initial adaptive refinement = 2
set Initial global refinement = 0
set Time steps between mesh refinement = 0
set Strategy = minimum refinement function
subsection Minimum refinement function
set Coordinate system = cartesian
set Variable names = x,y
set Function expression = if(y>300.e3,if(y>460.e3,2,1), 0)
end
end

subsection Formulation
set Formulation = custom
set Mass conservation = ask material model
set Temperature equation = reference density profile
end

subsection Initial temperature model
set Model name = world builder
end

subsection Boundary temperature model
set Fixed temperature boundary indicators=2,3
set Model name = box
subsection Box
set Bottom temperature = 1713
set Top temperature = 273
end
end

subsection Boundary velocity model
set Prescribed velocity boundary indicators = left:function
set Tangential velocity boundary indicators = right,bottom
end

subsection Boundary velocity model
subsection Function
set Variable names = x,y
set Function constants = Va=0.066
set Function expression = if(y>580e3,Va,0);0;
end
end

subsection Boundary composition model
set Fixed composition boundary indicators = bottom, left
set List of model names = initial composition
end

subsection Mesh deformation
set Mesh deformation boundary indicators=top:free surface
subsection Free surface
set Free surface stabilization theta=0.5
set Surface velocity projection = vertical
end
end

subsection Postprocess
set List of postprocessors = visualization,temperature statistics,topography,heat flux map
subsection Visualization
set List of output variables = heat flux map
set Time between graphical output = 1e5
set Interpolate output = true
end
end

@undeadfast: The error happens during matrix assembly and is generally caused by using a coefficient that is infinite or results from a 1-divided-by-0 expression. The typical cause would be a problem in the material model.

Rather than explore where this is coming from right away, can you say which version of ASPECT you are using? Do you have the option of upgrading to the latest version to see whether the problem is already fixed?

Best
W.

Thanks for your help. I used ASPECT version 2.20 with docker. Is this my set up problem or ASPECT problem?

@undeadfast - I think this is likely a setup in the model. I agree with @bangerth suggestion that this may be an issue with how the material properties are being defined.

A simple way to check is to make your model isoviscous and see if the problem persists. You can also further simplify by using constant thermodynamic properties. If this resolves the issue, then you can systematically start adding complexity back in.

I will also note that prescribing internal velocity variations can often lead to solver errors in the Stokes and Temperature solves.