mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
multiphase: Update phase-naming to use the new convention e.g. alpha.water
This commit is contained in:
11
applications/solvers/multiphase/cavitatingFoam/alphavPsi.H
Normal file
11
applications/solvers/multiphase/cavitatingFoam/alphavPsi.H
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
alphav = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));
|
||||
alphal = 1.0 - alphav;
|
||||
|
||||
Info<< "max-min alphav: " << max(alphav).value()
|
||||
<< " " << min(alphav).value() << endl;
|
||||
|
||||
psiModel->correct();
|
||||
|
||||
//Info<< "min a: " << 1.0/sqrt(max(psi)).value() << endl;
|
||||
}
|
||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
#include "gammaPsi.H"
|
||||
#include "alphavPsi.H"
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
volScalarField thermoRho = psi*p + gamma2*rhol0;
|
||||
volScalarField thermoRho = psi*p + alphal*rhol0;
|
||||
|
||||
dimensionedScalar totalMass = fvc::domainIntegrate(rho);
|
||||
|
||||
|
||||
@ -44,19 +44,19 @@
|
||||
|
||||
Info<< "Reading transportProperties\n" << endl;
|
||||
|
||||
incompressibleTwoPhaseMixture twoPhaseProperties(U, phiv, "gamma");
|
||||
incompressibleTwoPhaseMixture twoPhaseProperties(U, phiv);
|
||||
|
||||
volScalarField& gamma(twoPhaseProperties.alpha1());
|
||||
gamma.oldTime();
|
||||
volScalarField& alphav(twoPhaseProperties.alpha1());
|
||||
alphav.oldTime();
|
||||
|
||||
volScalarField& gamma2(twoPhaseProperties.alpha2());
|
||||
volScalarField& alphal(twoPhaseProperties.alpha2());
|
||||
|
||||
Info<< "Creating compressibilityModel\n" << endl;
|
||||
autoPtr<barotropicCompressibilityModel> psiModel =
|
||||
barotropicCompressibilityModel::New
|
||||
(
|
||||
thermodynamicProperties,
|
||||
gamma
|
||||
alphav
|
||||
);
|
||||
|
||||
const volScalarField& psi = psiModel->psi();
|
||||
@ -64,8 +64,8 @@
|
||||
rho == max
|
||||
(
|
||||
psi*p
|
||||
+ gamma2*rhol0
|
||||
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
|
||||
+ alphal*rhol0
|
||||
+ ((alphav*psiv + alphal*psil) - psi)*pSat,
|
||||
rhoMin
|
||||
);
|
||||
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
{
|
||||
gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));
|
||||
gamma2 = 1.0 - gamma;
|
||||
|
||||
Info<< "max-min gamma: " << max(gamma).value()
|
||||
<< " " << min(gamma).value() << endl;
|
||||
|
||||
psiModel->correct();
|
||||
|
||||
//Info<< "min a: " << 1.0/sqrt(max(psi)).value() << endl;
|
||||
}
|
||||
@ -4,8 +4,8 @@
|
||||
p =
|
||||
(
|
||||
rho
|
||||
- gamma2*rhol0
|
||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
||||
- alphal*rhol0
|
||||
- ((alphav*psiv + alphal*psil) - psi)*pSat
|
||||
)/psi;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi, p)
|
||||
- (rhol0 + (psil - psiv)*pSat)*fvc::ddt(gamma) - pSat*fvc::ddt(psi)
|
||||
- (rhol0 + (psil - psiv)*pSat)*fvc::ddt(alphav) - pSat*fvc::ddt(psi)
|
||||
+ fvc::div(phiv, rho)
|
||||
+ fvc::div(phiGradp)
|
||||
- fvm::laplacian(rAUf, p)
|
||||
@ -49,18 +49,18 @@
|
||||
rho == max
|
||||
(
|
||||
psi*p
|
||||
+ gamma2*rhol0
|
||||
+ ((gamma*psiv + gamma2*psil) - psi)*pSat,
|
||||
+ alphal*rhol0
|
||||
+ ((alphav*psiv + alphal*psil) - psi)*pSat,
|
||||
rhoMin
|
||||
);
|
||||
|
||||
#include "gammaPsi.H"
|
||||
#include "alphavPsi.H"
|
||||
|
||||
p =
|
||||
(
|
||||
rho
|
||||
- gamma2*rhol0
|
||||
- ((gamma*psiv + gamma2*psil) - psi)*pSat
|
||||
- alphal*rhol0
|
||||
- ((alphav*psiv + alphal*psil) - psi)*pSat
|
||||
)/psi;
|
||||
|
||||
p.correctBoundaryConditions();
|
||||
|
||||
@ -49,12 +49,12 @@ Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo
|
||||
thermo2_(NULL)
|
||||
{
|
||||
{
|
||||
volScalarField T1("T" + phase1Name(), T_);
|
||||
volScalarField T1(IOobject::groupName("T", phase1Name()), T_);
|
||||
T1.write();
|
||||
}
|
||||
|
||||
{
|
||||
volScalarField T2("T" + phase2Name(), T_);
|
||||
volScalarField T2(IOobject::groupName("T", phase2Name()), T_);
|
||||
T2.write();
|
||||
}
|
||||
|
||||
|
||||
@ -42,11 +42,10 @@ namespace phaseChangeTwoPhaseMixtures
|
||||
Foam::phaseChangeTwoPhaseMixtures::Kunz::Kunz
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi, alpha1Name),
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||
|
||||
UInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf")),
|
||||
tInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf")),
|
||||
|
||||
@ -91,8 +91,7 @@ public:
|
||||
Kunz
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name = "alpha1"
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -42,11 +42,10 @@ namespace phaseChangeTwoPhaseMixtures
|
||||
Foam::phaseChangeTwoPhaseMixtures::Merkle::Merkle
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi, alpha1Name),
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||
|
||||
UInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("UInf")),
|
||||
tInf_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("tInf")),
|
||||
|
||||
@ -85,8 +85,7 @@ public:
|
||||
Merkle
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name = "alpha1"
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -49,11 +49,10 @@ namespace phaseChangeTwoPhaseMixtures
|
||||
Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::SchnerrSauer
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi, alpha1Name),
|
||||
phaseChangeTwoPhaseMixture(typeName, U, phi),
|
||||
|
||||
n_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("n")),
|
||||
dNuc_(phaseChangeTwoPhaseMixtureCoeffs_.lookup("dNuc")),
|
||||
|
||||
@ -98,8 +98,7 @@ public:
|
||||
SchnerrSauer
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name = "alpha1"
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -32,8 +32,7 @@ Foam::autoPtr<Foam::phaseChangeTwoPhaseMixture>
|
||||
Foam::phaseChangeTwoPhaseMixture::New
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
{
|
||||
IOdictionary transportPropertiesDict
|
||||
@ -73,7 +72,7 @@ Foam::phaseChangeTwoPhaseMixture::New
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi, alpha1Name));
|
||||
return autoPtr<phaseChangeTwoPhaseMixture>(cstrIter()(U, phi));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -39,11 +39,10 @@ Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture
|
||||
(
|
||||
const word& type,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name
|
||||
const surfaceScalarField& phi
|
||||
)
|
||||
:
|
||||
incompressibleTwoPhaseMixture(U, phi, alpha1Name),
|
||||
incompressibleTwoPhaseMixture(U, phi),
|
||||
phaseChangeTwoPhaseMixtureCoeffs_(subDict(type + "Coeffs")),
|
||||
pSat_(lookup("pSat"))
|
||||
{}
|
||||
|
||||
@ -91,10 +91,9 @@ public:
|
||||
components,
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name
|
||||
const surfaceScalarField& phi
|
||||
),
|
||||
(U, phi, alpha1Name)
|
||||
(U, phi)
|
||||
);
|
||||
|
||||
|
||||
@ -104,8 +103,7 @@ public:
|
||||
static autoPtr<phaseChangeTwoPhaseMixture> New
|
||||
(
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name = "alpha1"
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
|
||||
|
||||
@ -116,8 +114,7 @@ public:
|
||||
(
|
||||
const word& type,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const word& alpha1Name = "alpha1"
|
||||
const surfaceScalarField& phi
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
word alphaScheme("div(phi,alpha1)");
|
||||
word alphaScheme("div(phi,alpha)");
|
||||
|
||||
surfaceScalarField phiAlpha
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user