mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
compressibleInterFoam: Added support for fvOptions in both the U and T equations
This commit is contained in:
@ -12,12 +12,17 @@
|
|||||||
alpha1/mixture.thermo1().Cv()
|
alpha1/mixture.thermo1().Cv()
|
||||||
+ alpha2/mixture.thermo2().Cv()
|
+ alpha2/mixture.thermo2().Cv()
|
||||||
)
|
)
|
||||||
|
==
|
||||||
|
fvOptions(rho, T)
|
||||||
);
|
);
|
||||||
|
|
||||||
TEqn.relax();
|
TEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(TEqn);
|
||||||
|
|
||||||
TEqn.solve();
|
TEqn.solve();
|
||||||
|
|
||||||
mixture.correct();
|
fvOptions.correct(T);
|
||||||
|
|
||||||
Info<< "min(T) " << min(T).value() << endl;
|
mixture.correct();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,14 @@
|
|||||||
fvm::ddt(rho, U)
|
fvm::ddt(rho, U)
|
||||||
+ fvm::div(rhoPhi, U)
|
+ fvm::div(rhoPhi, U)
|
||||||
+ turbulence->divDevRhoReff(U)
|
+ turbulence->divDevRhoReff(U)
|
||||||
|
==
|
||||||
|
fvOptions(rho, U)
|
||||||
);
|
);
|
||||||
|
|
||||||
UEqn.relax();
|
UEqn.relax();
|
||||||
|
|
||||||
|
fvOptions.constrain(UEqn);
|
||||||
|
|
||||||
if (pimple.momentumPredictor())
|
if (pimple.momentumPredictor())
|
||||||
{
|
{
|
||||||
solve
|
solve
|
||||||
@ -23,5 +27,7 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
fvOptions.correct(U);
|
||||||
|
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,6 +46,7 @@ Description
|
|||||||
#include "twoPhaseMixtureThermo.H"
|
#include "twoPhaseMixtureThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
#include "fvOptions.H"
|
||||||
#include "CorrectPhi.H"
|
#include "CorrectPhi.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -60,6 +61,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "initContinuityErrs.H"
|
#include "initContinuityErrs.H"
|
||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
#include "createFvOptions.H"
|
||||||
#include "createUf.H"
|
#include "createUf.H"
|
||||||
#include "createControls.H"
|
#include "createControls.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
|
|||||||
@ -101,6 +101,7 @@
|
|||||||
U = HbyA
|
U = HbyA
|
||||||
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
fvOptions.correct(U);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,7 +122,4 @@
|
|||||||
p_rgh.correctBoundaryConditions();
|
p_rgh.correctBoundaryConditions();
|
||||||
|
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
Info<< "max(U) " << max(mag(U)).value() << endl;
|
|
||||||
Info<< "min(p_rgh) " << min(p_rgh).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -44,6 +44,7 @@ Description
|
|||||||
#include "twoPhaseMixtureThermo.H"
|
#include "twoPhaseMixtureThermo.H"
|
||||||
#include "turbulentFluidThermoModel.H"
|
#include "turbulentFluidThermoModel.H"
|
||||||
#include "pimpleControl.H"
|
#include "pimpleControl.H"
|
||||||
|
#include "fvOptions.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -57,6 +58,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "createControl.H"
|
#include "createControl.H"
|
||||||
#include "createTimeControls.H"
|
#include "createTimeControls.H"
|
||||||
#include "createFields.H"
|
#include "createFields.H"
|
||||||
|
#include "createFvOptions.H"
|
||||||
#include "CourantNo.H"
|
#include "CourantNo.H"
|
||||||
#include "setInitialDeltaT.H"
|
#include "setInitialDeltaT.H"
|
||||||
|
|
||||||
|
|||||||
@ -98,6 +98,7 @@
|
|||||||
U = HbyA
|
U = HbyA
|
||||||
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
+ rAU*fvc::reconstruct((phig + p_rghEqnIncomp.flux())/rAUf);
|
||||||
U.correctBoundaryConditions();
|
U.correctBoundaryConditions();
|
||||||
|
fvOptions.correct(U);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +113,4 @@
|
|||||||
p_rgh.correctBoundaryConditions();
|
p_rgh.correctBoundaryConditions();
|
||||||
|
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
Info<< "max(U) " << max(mag(U)).value() << endl;
|
|
||||||
Info<< "min(p_rgh) " << min(p_rgh).value() << endl;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user