executed with foamRun for single region simulations of foamMultiRun for
multi-region simulations. Replaces interFoam and all the corresponding
tutorials have been updated and moved to tutorials/modules/incompressibleVoF.
Both incompressibleVoF and compressibleVoF solver modules are derived from the
common two-phase VoF base-class solvers::VoFSolver which handles the
complexities of VoF interface-compression, boundedness and conservation with
2nd-order schemes in space and time using the semi-implicit MULES limiter and
solution proceedure. This maximises code re-use, improves readability and
simplifies maintenance.
Class
Foam::solvers::incompressibleVoF
Description
Solver module for for 2 incompressible, isothermal immiscible fluids using a
VOF (volume of fluid) phase-fraction based interface capturing approach,
with optional mesh motion and mesh topology changes including adaptive
re-meshing.
The momentum and other fluid properties are of the "mixture" and a single
momentum equation is solved.
Either mixture or two-phase transport modelling may be selected. In the
mixture approach a single laminar, RAS or LES model is selected to model the
momentum stress. In the Euler-Euler two-phase approach separate laminar,
RAS or LES selected models are selected for each of the phases.
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
Optional fvModels and fvConstraints are provided to enhance the simulation
in many ways including adding various sources, Lagrangian
particles, surface film etc. and constraining or limiting the solution.
SourceFiles
incompressibleVoF.C
See also
Foam::solvers::VoFSolver
Foam::solvers::compressibleVoF
134 lines
3.2 KiB
C++
134 lines
3.2 KiB
C++
/*--------------------------------*- C++ -*----------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration | Website: https://openfoam.org
|
|
\\ / A nd | Version: dev
|
|
\\/ M anipulation |
|
|
\*---------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
format ascii;
|
|
class dictionary;
|
|
object dynamicMeshDict;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
mover
|
|
{
|
|
type motionSolver;
|
|
|
|
libs ("libfvMeshMovers.so" "librigidBodyMeshMotion.so");
|
|
|
|
motionSolver rigidBodyMotion;
|
|
|
|
rigidBodyMotionCoeffs
|
|
{
|
|
report on;
|
|
|
|
solver
|
|
{
|
|
type Newmark;
|
|
}
|
|
|
|
accelerationRelaxation 0.7;
|
|
|
|
bodies
|
|
{
|
|
floatingObject
|
|
{
|
|
type cuboid;
|
|
parent root;
|
|
|
|
// Cuboid dimensions
|
|
Lx 0.3;
|
|
Ly 0.2;
|
|
Lz 0.5;
|
|
|
|
// Density of the cuboid
|
|
rho 500;
|
|
|
|
// Cuboid mass
|
|
mass #calc "$rho*$Lx*$Ly*$Lz";
|
|
L ($Lx $Ly $Lz);
|
|
centreOfMass (0 0 0.25);
|
|
transform (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1);
|
|
|
|
joint
|
|
{
|
|
type composite;
|
|
joints
|
|
(
|
|
{
|
|
type Py;
|
|
}
|
|
{
|
|
type Ry;
|
|
}
|
|
);
|
|
}
|
|
|
|
patches (floatingObject);
|
|
innerDistance 0.05;
|
|
outerDistance 0.35;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
topoChanger
|
|
{
|
|
type refiner;
|
|
|
|
libs ("libfvMeshTopoChangers.so");
|
|
|
|
// How often to refine
|
|
refineInterval 1;
|
|
|
|
// Field to be refinement on
|
|
field alpha.water;
|
|
|
|
// Refine field in between lower..upper
|
|
lowerRefineLevel 0.001;
|
|
upperRefineLevel 0.999;
|
|
|
|
// Have slower than 2:1 refinement
|
|
nBufferLayers 1;
|
|
|
|
// Refine cells only up to maxRefinement levels
|
|
maxRefinement 1;
|
|
|
|
// Stop refinement if maxCells reached
|
|
maxCells 200000;
|
|
|
|
// Flux field and corresponding velocity field. Fluxes on changed
|
|
// faces get recalculated by interpolating the velocity. Use 'none'
|
|
// on surfaceScalarFields that do not need to be reinterpolated.
|
|
correctFluxes
|
|
(
|
|
(phi none)
|
|
(nHatf none)
|
|
(rhoPhi none)
|
|
(alphaPhi.water none)
|
|
(meshPhi none)
|
|
(meshPhi_0 none)
|
|
(ghf none)
|
|
);
|
|
|
|
// Write the refinement level as a volScalarField
|
|
dumpLevel true;
|
|
}
|
|
|
|
|
|
distributor
|
|
{
|
|
type distributor;
|
|
|
|
libs ("libfvMeshDistributors.so");
|
|
|
|
redistributionInterval 10;
|
|
}
|
|
|
|
|
|
// ************************************************************************* //
|