foamRun,foamMultiRun: fvModels are now corrected directly

This ensures that all fvModels in all regions are updated before continuity is
predicted in any region so that inter-region mass transfers are included in the
region continuity equations.
This commit is contained in:
Henry Weller
2023-05-17 14:31:11 +01:00
parent b51aaf0464
commit 00cb37652f
14 changed files with 15 additions and 42 deletions

View File

@ -134,6 +134,11 @@ int main(int argc, char *argv[])
solvers[i].moveMesh();
}
forAll(solvers, i)
{
solvers[i].fvModels().correct();
}
forAll(solvers, i)
{
solvers[i].prePredictor();

View File

@ -136,6 +136,7 @@ int main(int argc, char *argv[])
while (pimple.loop())
{
solver.moveMesh();
solver.fvModels().correct();
solver.prePredictor();
solver.momentumPredictor();
solver.thermophysicalPredictor();

View File

@ -251,9 +251,7 @@ void Foam::solvers::VoFSolver::preSolve()
void Foam::solvers::VoFSolver::prePredictor()
{
fvModels().correct();
}
{}
void Foam::solvers::VoFSolver::postSolve()

View File

@ -65,17 +65,6 @@ Foam::solvers::film::~film()
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::solvers::film::prePredictor()
{
isothermalFilm::prePredictor();
if (pimple.predictTransport())
{
thermophysicalTransport->predict();
}
}
void Foam::solvers::film::postCorrector()
{
isothermalFilm::postCorrector();

View File

@ -92,9 +92,6 @@ public:
// Member Functions
//- Called at the start of the PIMPLE loop
virtual void prePredictor();
//- Construct and solve the energy equation,
// convert to temperature
// and update thermophysical and transport properties

View File

@ -344,8 +344,6 @@ void Foam::solvers::incompressibleDenseParticleFluid::prePredictor()
).ptr();
}
fvModels().correct();
if (pimple.predictTransport())
{
momentumTransport->predict();

View File

@ -204,8 +204,6 @@ void Foam::solvers::incompressibleFluid::preSolve()
void Foam::solvers::incompressibleFluid::prePredictor()
{
fvModels().correct();
if (pimple.predictTransport())
{
momentumTransport->predict();

View File

@ -24,9 +24,9 @@ derivedFvPatchFields/filmSurfaceVelocity/filmSurfaceVelocityFvPatchVectorField.C
filmGaussGrad/filmGaussGrads.C
contactForce.C
continuityPredictor.C
prePredictor.C
momentumPredictor.C
predictAlpha.C
correctAlpha.C
isothermalFilm.C

View File

@ -30,7 +30,7 @@ License
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::solvers::isothermalFilm::predictAlpha()
void Foam::solvers::isothermalFilm::continuityPredictor()
{
// Update delta and alpha BCs for time-varying inlets etc.
delta_.correctBoundaryConditions();

View File

@ -203,16 +203,16 @@ private:
//- Correct the cached Courant number
void correctCoNum();
// Solve the explicit continuity equation for the film volume-fraction
// to predict the film thickness
void continuityPredictor();
// Calculate the continuity error caused by limiting alpha
void correctContinuityError();
//- Print the continuity errors
void continuityErrors();
//- Construct the explicit film volume-fraction prediction equation
// and predict the film thickness
void predictAlpha();
//- Update film thickness delta from the film volume-fraction
void correctDelta();

View File

@ -29,11 +29,7 @@ License
void Foam::solvers::isothermalFilm::prePredictor()
{
predictAlpha();
fvModels().correct();
predictAlpha();
continuityPredictor();
if (pimple.predictTransport())
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,8 +39,6 @@ void Foam::solvers::isothermalFluid::prePredictor()
correctDensity();
}
fvModels().correct();
if (pimple.predictTransport())
{
momentumTransport->predict();

View File

@ -242,11 +242,6 @@ void Foam::solvers::multiphaseEuler::preSolve()
void Foam::solvers::multiphaseEuler::prePredictor()
{
if (pimple.models())
{
fvModels().correct();
}
if (pimple.thermophysics() || pimple.flow())
{
fluid_.solve(rAUs, rAUfs);

View File

@ -33,8 +33,6 @@ void Foam::solvers::shockFluid::prePredictor()
correctDensity();
fvModels().correct();
if (!inviscid && pimple.predictTransport())
{
momentumTransport->predict();