cbcflow.core.nssolver module¶
Classes¶
-
class
cbcflow.core.nssolver.
NSSolver
(problem, scheme, postprocessor=None, params=None)¶ Bases:
Parameterized
High level Navier-Stokes solver. This handles all logic between the cbcflow components.
For full functionality, the user should instantiate this class with a NSProblem instance, NSScheme instance and cbcpost.PostProcessor instance.
-
classmethod
default_params
()¶ Returns the default parameters for a problem.
- Explanation of parameters:
- restart: bool, turn restart mode on or off
- restart_time: float, time to search for restart data
- restart_timestep: int, timestep to search for restart data
- check_memory_frequency: int, timestep frequency to check memory consumption
- timer_frequency: int, timestep frequency to print more detailed timing
- enable_annotation: bool, enable annotation of solve with dolfin-adjoint
If restart=True, maximum one of restart_time and restart_timestep can be set.
-
isolve
()¶ Experimental iterative version of solve().
-
solve
()¶ Handles top level logic related to solve.
Cleans casedir or loads restart data, stores parameters and mesh in casedir, calls scheme.solve, and lets postprocessor finalize all fields.
Returns: namespace dict returned from scheme.solve
-
update
(u, p, d, t, timestep, spaces)¶ Callback from scheme.solve after each timestep to handle update of postprocessor, timings, memory etc.
-
classmethod