Commit 3971bcbe authored by Matthieu Constant's avatar Matthieu Constant
Browse files

check comments

parent d88f1ea9
Pipeline #5720 passed with stage
in 2 minutes and 14 seconds
......@@ -123,6 +123,7 @@ class FluidProblem :
Keyword arguments:
tag -- physical tag (or list of tags), set in the mesh.geo file, of the wall boundaries
pressure -- the pressure value if imposed (callback or number)
velocity -- the velocity value if imposed (callback or number)
"""
if not _is_string(tag) :
for t in tag :
......@@ -150,10 +151,15 @@ class FluidProblem :
Keyword arguments:
tag -- physical tag (set in the mesh.geo file) of the boundary on which the flux type is added
bnd_type -- type of the boundary flux: wall, pressure, velocity
velocity -- the velocity value if imposed (callback or number)
pressure -- the pressure value if imposed (callback or number)
porosity -- porosity value outside the boudary
concentration -- concentration outside the boundary
Raises:
ValueError -- if the number of values set in the list callback_or_value do not match what is expected for the boundary type : wall do not take any values; pressure takes a value for the pressure and concentration if any; velocity takes values for each velocity dimension and the concentration if any.
NameError -- If the specified porosity outside the boundary is too small
NameError -- If velocity and pressure are not specified or if they are both specified at the open boundary. It should be one or the other
NameError -- if the dimension of the velocity vector is not equal to the physical dimension of the problem
"""
if porosity < 1e-3 :
raise NameError("Inflow porosity too small!")
......@@ -205,6 +211,9 @@ class FluidProblem :
lcmax -- maximum mesh radius
lcmin -- minimum mesh radius
n_el -- number of element wanted
old_n_particles -- number of particles at the previous time step
old_particle_position -- position of the particles at the previous time step
old_particle_volume -- volume of the particles at the previous time step
cmax -- optional argument to weigh maximum gradient used in the adaptation formula
cmin -- optional argument to weigh minimum gradient used in the adaptation formula
"""
......@@ -234,6 +243,7 @@ class FluidProblem :
output_dir -- output directory
t -- computation time
it -- computation iteration
stab -- if True export the stabilisation parametres in the output files
"""
v = self.solution()[:,:self._dim]
da = self.concentration_dg_grad()
......@@ -309,6 +319,8 @@ class FluidProblem :
newton_atol -- optional argument to specify absolute tolerance for nonlinear solver
newton_rtol -- optional argument to specify relative tolerance for nonlinear solver
newton_max_it -- optional argument to specify maximum number of iterations for nonlinear solver
reduced_graviy -- if True simulations are run with a reduced gravity (not to use in two fluids simulations)
stab_param -- if zero pspg/supg/lsic stabilisation is computed otherwise the value is used as a coefficient for a pressure laplacian stabilisation term
"""
self._lib.fluid_problem_set_reduced_gravity(self._fp,c_int(reduced_gravity))
self._lib.fluid_problem_set_stab_param(self._fp,c_double(stab_param))
......@@ -316,6 +328,11 @@ class FluidProblem :
return nit
def advance_concentration(self,dt):
"""Solve the advection equation for the concentration using the current velocity field.
Keyword arguments:
dt -- computation time step
"""
if self._n_fluids == 2 :
nv = np.linalg.norm(self.solution()[:,:self._dim],axis=1)
nvmax = np.max(nv[self.elements()],axis=1,keepdims=True)
......@@ -335,6 +352,7 @@ class FluidProblem :
volume -- list of particles volume
position -- list of particles centre positions
velocity -- list of particles velocity
init -- if True set the old_porosity to zero (has to be used at the first call)
reload -- optional arguments specifying if the simulation is reloaded or if it is the first iteration
"""
def np2c(a) :
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment