mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Provides run-time selection of buoyancy sources for compressible solvers
Replaces the built-in buoyancy sources in XiFoam, reactingFoam and
rhoReactingFoam.
e.g. in constant/fvOptions specify
momentumSource
{
type buoyancyForce;
buoyancyForceCoeffs
{
fieldNames (U);
}
}
and optionally specify the buoyancy energy source in the enthalpy
equation:
energySource
{
type buoyancyEnergy;
buoyancyEnergyCoeffs
{
fieldNames (h);
}
}
or internal energy equation
energySource
{
type buoyancyEnergy;
buoyancyEnergyCoeffs
{
fieldNames (e);
}
}
23 lines
409 B
C
23 lines
409 B
C
MRF.correctBoundaryVelocity(U);
|
|
|
|
fvVectorMatrix UEqn
|
|
(
|
|
fvm::ddt(rho, U) + fvm::div(phi, U)
|
|
+ MRF.DDt(rho, U)
|
|
+ turbulence->divDevRhoReff(U)
|
|
==
|
|
fvOptions(rho, U)
|
|
);
|
|
|
|
UEqn.relax();
|
|
|
|
fvOptions.constrain(UEqn);
|
|
|
|
if (pimple.momentumPredictor())
|
|
{
|
|
solve(UEqn == -fvc::grad(p));
|
|
|
|
fvOptions.correct(U);
|
|
K = 0.5*magSqr(U);
|
|
}
|