Commit bfdaccf7 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

advance_concentration

parent 4d279a1a
Pipeline #5466 passed with stage
in 55 seconds
......@@ -302,6 +302,9 @@ class FluidProblem :
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))
nit = self._lib.fluid_problem_implicit_euler(self._fp, c_double(dt), c_double(newton_atol), c_double(newton_rtol), c_int(newton_max_it))
return nit
def advance_concentration(self,dt):
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)
......@@ -312,7 +315,6 @@ class FluidProblem :
print("sub-iterating advection for cfl : %i sub-iterations"%nsub)
for i in range(nsub) :
self._lib.fluid_problem_advance_concentration(self._fp,c_double(dt/nsub))
return nit
def set_particles(self, mass, volume, position, velocity, contact, init=False, reload = False):
"""Set location of the grains in the mesh and compute the porosity in each cell.
......
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