ldc.FVSolver#
- class ldc.FVSolver(**kwargs)[source]#
Bases:
LidDrivenCavitySolverFinite volume solver for lid-driven cavity problem.
This solver uses a collocated grid arrangement with Rhie-Chow interpolation for pressure-velocity coupling using the SIMPLE algorithm.
- Parameters:
- config
FVinfo Configuration with physics (Re, lid velocity, domain size) and FV-specific parameters (nx, ny, convection scheme, etc.).
- config
Methods
__init__Initialize FV solver.
Save results to HDF5 file.
Solve the lid-driven cavity problem using iterative stepping.
Perform one SIMPLE iteration.
Attributes
Examples using
ldc.FVSolver#- Config#
alias of
FVinfo
- ResultFields#
alias of
FVResultFields
- rho = 1.0#
- solve(tolerance: float = None, max_iter: int = None)#
Solve the lid-driven cavity problem using iterative stepping.
This method implements the common iteration loop with residual calculation. Subclasses implement step() to define one iteration.
Stores results in solver attributes: - self.fields : Fields dataclass with solution fields - self.time_series : TimeSeries dataclass with time series data - self.metadata : Metadata dataclass with solver metadata
- step()[source]#
Perform one SIMPLE iteration.
- Returns:
- u, v, p
np.ndarray Updated velocity and pressure fields
- u, v, p