cbcflow.core.nssolver module¶
Classes¶
- class cbcflow.core.nssolver.NSSolver(problem, scheme=None, postprocessor=None, params=None)¶
Bases: cbcflow.core.parameterized.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 NSPostProcessor instance.
- classmethod default_params()¶
Returns the default parameters for a problem.
- Explanation of parameters:
- debug: bool, debug mode
- check_mem_frequency: int, timestep frequency to check memory consumption
- 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
If restart=True, maximum one of restart_time and restart_timestep can be set.
- 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, t, timestep, spaces)¶
Callback from scheme.solve after each timestep to handle update of postprocessor, timings, memory etc.