Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2013-08-14 09:20:23 +01:00
212 changed files with 579 additions and 868 deletions

View File

@ -0,0 +1,20 @@
{
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;
}

View File

@ -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

View File

@ -1,5 +1,5 @@
{
volScalarField thermoRho = psi*p + gamma2*rhol0;
volScalarField thermoRho = psi*p + alphal*rhol0;
dimensionedScalar totalMass = fvc::domainIntegrate(rho);

View File

@ -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
);

View File

@ -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;
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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")),

View File

@ -91,8 +91,7 @@ public:
Kunz
(
const volVectorField& U,
const surfaceScalarField& phi,
const word& alpha1Name = "alpha1"
const surfaceScalarField& phi
);

View File

@ -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")),

View File

@ -85,8 +85,7 @@ public:
Merkle
(
const volVectorField& U,
const surfaceScalarField& phi,
const word& alpha1Name = "alpha1"
const surfaceScalarField& phi
);

View File

@ -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")),

View File

@ -98,8 +98,7 @@ public:
SchnerrSauer
(
const volVectorField& U,
const surfaceScalarField& phi,
const word& alpha1Name = "alpha1"
const surfaceScalarField& phi
);

View File

@ -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));
}

View File

@ -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"))
{}

View File

@ -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
);

View File

@ -1,5 +1,5 @@
{
word alphaScheme("div(phi,alpha1)");
word alphaScheme("div(phi,alpha)");
surfaceScalarField phiAlpha
(

View File

@ -39,7 +39,8 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
)
:
fixedValueFvPatchField<vector>(p, iF),
flowRate_(0)
flowRate_(0),
alphaName_("none")
{}
@ -53,7 +54,8 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
)
:
fixedValueFvPatchField<vector>(ptf, p, iF, mapper),
flowRate_(ptf.flowRate_)
flowRate_(ptf.flowRate_),
alphaName_(ptf.alphaName_)
{}
@ -66,7 +68,8 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
)
:
fixedValueFvPatchField<vector>(p, iF, dict),
flowRate_(readScalar(dict.lookup("flowRate")))
flowRate_(readScalar(dict.lookup("flowRate"))),
alphaName_(dict.lookup("alpha"))
{}
@ -77,7 +80,8 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
)
:
fixedValueFvPatchField<vector>(ptf),
flowRate_(ptf.flowRate_)
flowRate_(ptf.flowRate_),
alphaName_(ptf.alphaName_)
{}
@ -89,7 +93,8 @@ Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
)
:
fixedValueFvPatchField<vector>(ptf, iF),
flowRate_(ptf.flowRate_)
flowRate_(ptf.flowRate_),
alphaName_(ptf.alphaName_)
{}
@ -104,7 +109,7 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
}
scalarField alphap =
patch().lookupPatchField<volScalarField, scalar>("alpha1");
patch().lookupPatchField<volScalarField, scalar>(alphaName_);
alphap = max(alphap, scalar(0));
alphap = min(alphap, scalar(1));
@ -129,6 +134,8 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField::write
os.writeKeyword("flowRate") << flowRate_
<< token::END_STATEMENT << nl;
os.writeKeyword("alpha") << alphaName_
<< token::END_STATEMENT << nl;
writeEntry("value", os);
}

View File

@ -39,6 +39,7 @@ Description
\table
Property | Description | Required | Default value
flowRate | volumetric flow rate [m3/s] | yes |
alpha | phase-fraction field | yes |
\endtable
Example of the boundary condition specification:
@ -47,6 +48,7 @@ Description
{
type variableHeightFlowRateInletVelocity;
flowRate 0.2;
alpha alpha.water;
value uniform (0 0 0); // placeholder
}
\endverbatim
@ -87,6 +89,9 @@ class variableHeightFlowRateInletVelocityFvPatchVectorField
//- Inlet integral flow rate
scalar flowRate_;
//- Name of the phase-fraction field
word alphaName_;
public:

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -234,4 +234,16 @@ void Foam::CollidingCloud<CloudType>::motion(TrackData& td)
}
template<class CloudType>
void Foam::CollidingCloud<CloudType>::info()
{
CloudType::info();
scalar rotationalKineticEnergy = rotationalKineticEnergyOfSystem();
reduce(rotationalKineticEnergy, sumOp<scalar>());
Info<< " Rotational kinetic energy = "
<< rotationalKineticEnergy << nl;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -197,8 +197,13 @@ public:
inline CollisionModel<CollidingCloud<CloudType> >&
collision();
// Check
// Evolution
//- Total rotational kinetic energy in the system
inline scalar rotationalKineticEnergyOfSystem() const;
// Cloud evolution functions
//- Store the current cloud state
void storeState();
@ -212,6 +217,12 @@ public:
//- Particle motion
template<class TrackData>
void motion(TrackData& td);
// I-O
//- Print cloud information
void info();
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,4 +49,22 @@ Foam::CollidingCloud<CloudType>::collision()
}
template<class CloudType>
inline Foam::scalar
Foam::CollidingCloud<CloudType>::rotationalKineticEnergyOfSystem() const
{
scalar rotationalKineticEnergy = 0.0;
forAllConstIter(typename CollidingCloud<CloudType>, *this, iter)
{
const parcelType& p = iter();
rotationalKineticEnergy +=
p.nParticle()*0.5*p.momentOfInertia()*(p.omega() & p.omega());
}
return rotationalKineticEnergy;
}
// ************************************************************************* //

View File

@ -864,9 +864,6 @@ void Foam::KinematicCloud<CloudType>::info()
scalar linearKineticEnergy = linearKineticEnergyOfSystem();
reduce(linearKineticEnergy, sumOp<scalar>());
scalar rotationalKineticEnergy = rotationalKineticEnergyOfSystem();
reduce(rotationalKineticEnergy, sumOp<scalar>());
Info<< "Cloud: " << this->name() << nl
<< " Current number of parcels = "
<< returnReduce(this->size(), sumOp<label>()) << nl
@ -877,9 +874,7 @@ void Foam::KinematicCloud<CloudType>::info()
<< " |Linear momentum| = "
<< mag(linearMomentum) << nl
<< " Linear kinetic energy = "
<< linearKineticEnergy << nl
<< " Rotational kinetic energy = "
<< rotationalKineticEnergy << nl;
<< linearKineticEnergy << nl;
injectors_.info(Info);
this->surfaceFilm().info(Info);

View File

@ -487,9 +487,6 @@ public:
//- Total linear kinetic energy in the system
inline scalar linearKineticEnergyOfSystem() const;
//- Total rotational kinetic energy in the system
inline scalar rotationalKineticEnergyOfSystem() const;
//- Penetration for fraction [0-1] of the current total mass
inline scalar penetration(const scalar fraction) const;

View File

@ -307,24 +307,6 @@ Foam::KinematicCloud<CloudType>::linearKineticEnergyOfSystem() const
}
template<class CloudType>
inline Foam::scalar
Foam::KinematicCloud<CloudType>::rotationalKineticEnergyOfSystem() const
{
scalar rotationalKineticEnergy = 0.0;
forAllConstIter(typename KinematicCloud<CloudType>, *this, iter)
{
const parcelType& p = iter();
rotationalKineticEnergy +=
p.nParticle()*0.5*p.momentOfInertia()*(p.omega() & p.omega());
}
return rotationalKineticEnergy;
}
template<class CloudType>
inline Foam::scalar Foam::KinematicCloud<CloudType>::Dij
(

View File

@ -86,7 +86,7 @@ public:
virtual scalar linearKineticEnergyOfSystem() const = 0;
//- Total rotational kinetic energy in the system
virtual scalar rotationalKineticEnergyOfSystem() const = 0;
// virtual scalar rotationalKineticEnergyOfSystem() const = 0;
//- Penetration for percentage of the current total mass
// virtual scalar penetration(const scalar& fraction) const = 0;

View File

@ -34,6 +34,9 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
)
:
ParcelType(p),
f_(p.f_),
angularMomentum_(p.angularMomentum_),
torque_(p.torque_),
collisionRecords_(p.collisionRecords_)
{}
@ -46,6 +49,9 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
)
:
ParcelType(p, mesh),
f_(p.f_),
angularMomentum_(p.angularMomentum_),
torque_(p.torque_),
collisionRecords_(p.collisionRecords_)
{}
@ -166,6 +172,29 @@ bool Foam::CollidingParcel<ParcelType>::move
}
template<class ParcelType>
void Foam::CollidingParcel<ParcelType>::transformProperties(const tensor& T)
{
ParcelType::transformProperties(T);
f_ = transform(T, f_);
angularMomentum_ = transform(T, angularMomentum_);
torque_ = transform(T, torque_);
}
template<class ParcelType>
void Foam::CollidingParcel<ParcelType>::transformProperties
(
const vector& separation
)
{
ParcelType::transformProperties(separation);
}
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
#include "CollidingParcelIO.C"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -66,7 +66,7 @@ Ostream& operator<<
);
/*---------------------------------------------------------------------------*\
Class CollidingParcel Declaration
Class CollidingParcel Declaration
\*---------------------------------------------------------------------------*/
template<class ParcelType>
@ -78,6 +78,16 @@ protected:
// Protected data
//- Force on particle due to collisions [N]
vector f_;
//- Angular momentum of Parcel in global reference frame [kg m2/s]
vector angularMomentum_;
//- Torque on particle due to collisions in global
// reference frame [Nm]
vector torque_;
//- Particle collision records
collisionRecordList collisionRecords_;
@ -93,7 +103,10 @@ public:
AddToPropertyList
(
ParcelType,
" collisionRecordsPairAccessed"
" (fx fy fz)"
+ " (angularMomentumx angularMomentumy angularMomentumz)"
+ " (torquex torquey torquez)"
+ " collisionRecordsPairAccessed"
+ " collisionRecordsPairOrigProcOfOther"
+ " collisionRecordsPairOrigIdOfOther"
+ " (collisionRecordsPairData)"
@ -188,12 +201,33 @@ public:
// Access
//- Return const access to force
inline const vector& f() const;
//- Return const access to angular momentum
inline const vector& angularMomentum() const;
//- Return const access to torque
inline const vector& torque() const;
//- Return const access to the collision records
inline const collisionRecordList& collisionRecords() const;
//- Return access to force
inline vector& f();
//- Return access to angular momentum
inline vector& angularMomentum();
//- Return access to torque
inline vector& torque();
//- Return access to collision records
inline collisionRecordList& collisionRecords();
//- Particle angular velocity
inline vector omega() const;
// Tracking
@ -201,6 +235,14 @@ public:
template<class TrackData>
bool move(TrackData& td, const scalar trackTime);
//- Transform the physical properties of the particle
// according to the given transformation tensor
virtual void transformProperties(const tensor& T);
//- Transform the physical properties of the particle
// according to the given separation vector
virtual void transformProperties(const vector& separation);
// I-O

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -36,6 +36,9 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
)
:
ParcelType(owner, position, cellI, tetFaceI, tetPtI),
f_(vector::zero),
angularMomentum_(vector::zero),
torque_(vector::zero),
collisionRecords_()
{}
@ -70,18 +73,39 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel
nParticle0,
d0,
dTarget0,
U0,
f0,
angularMomentum0,
torque0,
constProps
),
f_(f0),
angularMomentum_(angularMomentum0),
torque_(torque0),
collisionRecords_()
{}
// * * * * * * * CollidingParcel Member Functions * * * * * * * //
template<class ParcelType>
inline const Foam::vector& Foam::CollidingParcel<ParcelType>::f() const
{
return f_;
}
template<class ParcelType>
inline const Foam::vector&
Foam::CollidingParcel<ParcelType>::angularMomentum() const
{
return angularMomentum_;
}
template<class ParcelType>
inline const Foam::vector& Foam::CollidingParcel<ParcelType>::torque() const
{
return torque_;
}
template<class ParcelType>
inline const Foam::collisionRecordList&
@ -91,6 +115,27 @@ Foam::CollidingParcel<ParcelType>::collisionRecords() const
}
template<class ParcelType>
inline Foam::vector& Foam::CollidingParcel<ParcelType>::f()
{
return f_;
}
template<class ParcelType>
inline Foam::vector& Foam::CollidingParcel<ParcelType>::angularMomentum()
{
return angularMomentum_;
}
template<class ParcelType>
inline Foam::vector& Foam::CollidingParcel<ParcelType>::torque()
{
return torque_;
}
template<class ParcelType>
inline Foam::collisionRecordList&
Foam::CollidingParcel<ParcelType>::collisionRecords()
@ -99,4 +144,11 @@ Foam::CollidingParcel<ParcelType>::collisionRecords()
}
template<class ParcelType>
inline Foam::vector Foam::CollidingParcel<ParcelType>::omega() const
{
return angularMomentum_/this->momentOfInertia();
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,10 +45,30 @@ Foam::CollidingParcel<ParcelType>::CollidingParcel
)
:
ParcelType(mesh, is, readFields),
f_(vector::zero),
angularMomentum_(vector::zero),
torque_(vector::zero),
collisionRecords_()
{
if (readFields)
{
if (is.format() == IOstream::ASCII)
{
is >> f_;
is >> angularMomentum_;
is >> torque_;
}
else
{
is.read
(
reinterpret_cast<char*>(&f_),
+ sizeof(f_)
+ sizeof(angularMomentum_)
+ sizeof(torque_)
);
}
is >> collisionRecords_;
}
@ -72,6 +92,18 @@ void Foam::CollidingParcel<ParcelType>::readFields(CloudType& c)
ParcelType::readFields(c);
IOField<vector> f(c.fieldIOobject("f", IOobject::MUST_READ));
c.checkFieldIOobject(c, f);
IOField<vector> angularMomentum
(
c.fieldIOobject("angularMomentum", IOobject::MUST_READ)
);
c.checkFieldIOobject(c, angularMomentum);
IOField<vector> torque(c.fieldIOobject("torque", IOobject::MUST_READ));
c.checkFieldIOobject(c, torque);
labelFieldCompactIOField collisionRecordsPairAccessed
(
c.fieldIOobject("collisionRecordsPairAccessed", IOobject::MUST_READ)
@ -128,6 +160,10 @@ void Foam::CollidingParcel<ParcelType>::readFields(CloudType& c)
{
CollidingParcel<ParcelType>& p = iter();
p.f_ = f[i];
p.angularMomentum_ = angularMomentum[i];
p.torque_ = torque[i];
p.collisionRecords_ = collisionRecordList
(
collisionRecordsPairAccessed[i],
@ -152,6 +188,14 @@ void Foam::CollidingParcel<ParcelType>::writeFields(const CloudType& c)
label np = c.size();
IOField<vector> f(c.fieldIOobject("f", IOobject::NO_READ), np);
IOField<vector> angularMomentum
(
c.fieldIOobject("angularMomentum", IOobject::NO_READ),
np
);
IOField<vector> torque(c.fieldIOobject("torque", IOobject::NO_READ), np);
labelFieldCompactIOField collisionRecordsPairAccessed
(
c.fieldIOobject("collisionRecordsPairAccessed", IOobject::NO_READ),
@ -198,6 +242,10 @@ void Foam::CollidingParcel<ParcelType>::writeFields(const CloudType& c)
{
const CollidingParcel<ParcelType>& p = iter();
f[i] = p.f();
angularMomentum[i] = p.angularMomentum();
torque[i] = p.torque();
collisionRecordsPairAccessed[i] = p.collisionRecords().pairAccessed();
collisionRecordsPairOrigProcOfOther[i] =
p.collisionRecords().pairOrigProcOfOther();
@ -211,6 +259,10 @@ void Foam::CollidingParcel<ParcelType>::writeFields(const CloudType& c)
i++;
}
f.write();
angularMomentum.write();
torque.write();
collisionRecordsPairAccessed.write();
collisionRecordsPairOrigProcOfOther.write();
collisionRecordsPairOrigIdOfOther.write();
@ -233,12 +285,22 @@ Foam::Ostream& Foam::operator<<
if (os.format() == IOstream::ASCII)
{
os << static_cast<const ParcelType&>(p)
<< token::SPACE << p.f()
<< token::SPACE << p.angularMomentum()
<< token::SPACE << p.torque()
<< token::SPACE << p.collisionRecords();
}
else
{
os << static_cast<const ParcelType&>(p)
<< p.collisionRecords();
os << static_cast<const ParcelType&>(p);
os.write
(
reinterpret_cast<const char*>(&p.f_),
+ sizeof(p.f())
+ sizeof(p.angularMomentum())
+ sizeof(p.torque())
);
os << p.collisionRecords();
}
// Check state of Ostream

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -213,9 +213,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
d_(p.d_),
dTarget_(p.dTarget_),
U_(p.U_),
f_(p.f_),
angularMomentum_(p.angularMomentum_),
torque_(p.torque_),
rho_(p.rho_),
age_(p.age_),
tTurb_(p.tTurb_),
@ -240,9 +237,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
d_(p.d_),
dTarget_(p.dTarget_),
U_(p.U_),
f_(p.f_),
angularMomentum_(p.angularMomentum_),
torque_(p.torque_),
rho_(p.rho_),
age_(p.age_),
tTurb_(p.tTurb_),
@ -437,12 +431,6 @@ void Foam::KinematicParcel<ParcelType>::transformProperties(const tensor& T)
ParcelType::transformProperties(T);
U_ = transform(T, U_);
f_ = transform(T, f_);
angularMomentum_ = transform(T, angularMomentum_);
torque_ = transform(T, torque_);
}

View File

@ -261,17 +261,6 @@ protected:
//- Velocity of Parcel [m/s]
vector U_;
//- Force on particle due to collisions [N]
vector f_;
//- Angular momentum of Parcel in global reference frame
// [kg m2/s]
vector angularMomentum_;
//- Torque on particle due to collisions in global
// reference frame [Nm]
vector torque_;
//- Density [kg/m3]
scalar rho_;
@ -332,9 +321,6 @@ public:
+ " d"
+ " dTarget "
+ " (Ux Uy Uz)"
+ " (fx fy fz)"
+ " (angularMomentumx angularMomentumy angularMomentumz)"
+ " (torquex torquey torquez)"
+ " rho"
+ " age"
+ " tTurb"
@ -367,9 +353,6 @@ public:
const scalar nParticle0,
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const constantProperties& constProps
);
@ -445,15 +428,6 @@ public:
//- Return const access to velocity
inline const vector& U() const;
//- Return const access to force
inline const vector& f() const;
//- Return const access to angular momentum
inline const vector& angularMomentum() const;
//- Return const access to torque
inline const vector& torque() const;
//- Return const access to density
inline scalar rho() const;
@ -496,15 +470,6 @@ public:
//- Return access to velocity
inline vector& U();
//- Return access to force
inline vector& f();
//- Return access to angular momentum
inline vector& angularMomentum();
//- Return access to torque
inline vector& torque();
//- Return access to density
inline scalar& rho();
@ -532,9 +497,6 @@ public:
//- Particle moment of inertia around diameter axis
inline scalar momentOfInertia() const;
//- Particle angular velocity
inline vector omega() const;
//- Particle volume
inline scalar volume() const;

View File

@ -135,9 +135,6 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
d_(0.0),
dTarget_(0.0),
U_(vector::zero),
f_(vector::zero),
angularMomentum_(vector::zero),
torque_(vector::zero),
rho_(0.0),
age_(0.0),
tTurb_(0.0),
@ -161,9 +158,6 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
const scalar d0,
const scalar dTarget0,
const vector& U0,
const vector& f0,
const vector& angularMomentum0,
const vector& torque0,
const constantProperties& constProps
)
:
@ -174,9 +168,6 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel
d_(d0),
dTarget_(dTarget0),
U_(U0),
f_(f0),
angularMomentum_(angularMomentum0),
torque_(torque0),
rho_(constProps.rho0()),
age_(0.0),
tTurb_(0.0),
@ -289,30 +280,6 @@ inline const Foam::vector& Foam::KinematicParcel<ParcelType>::U() const
}
template<class ParcelType>
inline const Foam::vector&
Foam::KinematicParcel<ParcelType>::f() const
{
return f_;
}
template<class ParcelType>
inline const Foam::vector&
Foam::KinematicParcel<ParcelType>::angularMomentum() const
{
return angularMomentum_;
}
template<class ParcelType>
inline const Foam::vector&
Foam::KinematicParcel<ParcelType>::torque() const
{
return torque_;
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::rho() const
{
@ -404,27 +371,6 @@ inline Foam::vector& Foam::KinematicParcel<ParcelType>::U()
}
template<class ParcelType>
inline Foam::vector& Foam::KinematicParcel<ParcelType>::f()
{
return f_;
}
template<class ParcelType>
inline Foam::vector& Foam::KinematicParcel<ParcelType>::angularMomentum()
{
return angularMomentum_;
}
template<class ParcelType>
inline Foam::vector& Foam::KinematicParcel<ParcelType>::torque()
{
return torque_;
}
template<class ParcelType>
inline Foam::scalar& Foam::KinematicParcel<ParcelType>::rho()
{
@ -492,13 +438,6 @@ inline Foam::scalar Foam::KinematicParcel<ParcelType>::momentOfInertia() const
}
template<class ParcelType>
inline Foam::vector Foam::KinematicParcel<ParcelType>::omega() const
{
return angularMomentum_/momentOfInertia();
}
template<class ParcelType>
inline Foam::scalar Foam::KinematicParcel<ParcelType>::volume() const
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,9 +51,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
d_(0.0),
dTarget_(0.0),
U_(vector::zero),
f_(vector::zero),
angularMomentum_(vector::zero),
torque_(vector::zero),
rho_(0.0),
age_(0.0),
tTurb_(0.0),
@ -72,9 +69,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
d_ = readScalar(is);
dTarget_ = readScalar(is);
is >> U_;
is >> f_;
is >> angularMomentum_;
is >> torque_;
rho_ = readScalar(is);
age_ = readScalar(is);
tTurb_ = readScalar(is);
@ -91,9 +85,6 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel
+ sizeof(d_)
+ sizeof(dTarget_)
+ sizeof(U_)
+ sizeof(f_)
+ sizeof(angularMomentum_)
+ sizeof(torque_)
+ sizeof(rho_)
+ sizeof(age_)
+ sizeof(tTurb_)
@ -141,18 +132,6 @@ void Foam::KinematicParcel<ParcelType>::readFields(CloudType& c)
IOField<vector> U(c.fieldIOobject("U", IOobject::MUST_READ));
c.checkFieldIOobject(c, U);
IOField<vector> f(c.fieldIOobject("f", IOobject::MUST_READ));
c.checkFieldIOobject(c, f);
IOField<vector> angularMomentum
(
c.fieldIOobject("angularMomentum", IOobject::MUST_READ)
);
c.checkFieldIOobject(c, angularMomentum);
IOField<vector> torque(c.fieldIOobject("torque", IOobject::MUST_READ));
c.checkFieldIOobject(c, torque);
IOField<scalar> rho(c.fieldIOobject("rho", IOobject::MUST_READ));
c.checkFieldIOobject(c, rho);
@ -177,8 +156,6 @@ void Foam::KinematicParcel<ParcelType>::readFields(CloudType& c)
p.d_ = d[i];
p.dTarget_ = dTarget[i];
p.U_ = U[i];
p.f_ = f[i];
p.angularMomentum_ = angularMomentum[i];
p.rho_ = rho[i];
p.age_ = age[i];
p.tTurb_ = tTurb[i];
@ -207,13 +184,6 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const CloudType& c)
IOField<scalar> d(c.fieldIOobject("d", IOobject::NO_READ), np);
IOField<scalar> dTarget(c.fieldIOobject("dTarget", IOobject::NO_READ), np);
IOField<vector> U(c.fieldIOobject("U", IOobject::NO_READ), np);
IOField<vector> f(c.fieldIOobject("f", IOobject::NO_READ), np);
IOField<vector> angularMomentum
(
c.fieldIOobject("angularMomentum", IOobject::NO_READ),
np
);
IOField<vector> torque(c.fieldIOobject("torque", IOobject::NO_READ), np);
IOField<scalar> rho(c.fieldIOobject("rho", IOobject::NO_READ), np);
IOField<scalar> age(c.fieldIOobject("age", IOobject::NO_READ), np);
IOField<scalar> tTurb(c.fieldIOobject("tTurb", IOobject::NO_READ), np);
@ -231,9 +201,6 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const CloudType& c)
d[i] = p.d();
dTarget[i] = p.dTarget();
U[i] = p.U();
f[i] = p.f();
angularMomentum[i] = p.angularMomentum();
torque[i] = p.torque();
rho[i] = p.rho();
age[i] = p.age();
tTurb[i] = p.tTurb();
@ -248,9 +215,6 @@ void Foam::KinematicParcel<ParcelType>::writeFields(const CloudType& c)
d.write();
dTarget.write();
U.write();
f.write();
angularMomentum.write();
torque.write();
rho.write();
age.write();
tTurb.write();
@ -276,9 +240,6 @@ Foam::Ostream& Foam::operator<<
<< token::SPACE << p.d()
<< token::SPACE << p.dTarget()
<< token::SPACE << p.U()
<< token::SPACE << p.f()
<< token::SPACE << p.angularMomentum()
<< token::SPACE << p.torque()
<< token::SPACE << p.rho()
<< token::SPACE << p.age()
<< token::SPACE << p.tTurb()
@ -296,9 +257,6 @@ Foam::Ostream& Foam::operator<<
+ sizeof(p.d())
+ sizeof(p.dTarget())
+ sizeof(p.U())
+ sizeof(p.f())
+ sizeof(p.angularMomentum())
+ sizeof(p.torque())
+ sizeof(p.rho())
+ sizeof(p.age())
+ sizeof(p.tTurb())

View File

@ -110,8 +110,6 @@ public:
const scalar Pr,
const scalar pMin,
const Switch& constantVolume,
const scalar Tvap,
const scalar Tbp,
const scalar sigma0,
const scalar mu0
);

View File

@ -82,8 +82,6 @@ inline Foam::SprayParcel<ParcelType>::constantProperties::constantProperties
const scalar Pr,
const scalar pMin,
const Switch& constantVolume,
const scalar Tvap,
const scalar Tbp,
const scalar sigma0,
const scalar mu0
)
@ -104,9 +102,7 @@ inline Foam::SprayParcel<ParcelType>::constantProperties::constantProperties
f0,
Pr,
pMin,
constantVolume,
Tvap,
Tbp
constantVolume
),
sigma0_(sigma0),
mu0_(mu0)

View File

@ -173,9 +173,6 @@ public:
//- Heat of formation [J/kg]
inline scalar Hf() const;
//- Total enthalpy - reference to Tstd [J/kg]
inline scalar H(const scalar T) const;
//- Sensible enthalpy - reference to Tstd [J/kg]
inline scalar Hs(const scalar T) const;

View File

@ -51,12 +51,6 @@ inline Foam::scalar Foam::solidProperties::Hf() const
}
inline Foam::scalar Foam::solidProperties::H(const scalar T) const
{
return Hs(T) + Hf_;
}
inline Foam::scalar Foam::solidProperties::Hs(const scalar T) const
{
return Cp_*(T - specie::Tstd);

View File

@ -217,9 +217,6 @@ public:
//- Enthalpy/Internal energy [J/kg]
inline scalar HE(const scalar p, const scalar T) const;
//- Enthalpy [J/kg]
inline scalar H(const scalar p, const scalar T) const;
//- Sensible enthalpy [J/kg]
inline scalar Hs(const scalar p, const scalar T) const;

View File

@ -215,14 +215,6 @@ Foam::species::thermo<Thermo, Type>::HE(const scalar p, const scalar T) const
}
template<class Thermo, template<class> class Type>
inline Foam::scalar
Foam::species::thermo<Thermo, Type>::H(const scalar p, const scalar T) const
{
return this->h(p, T)/this->W();
}
template<class Thermo, template<class> class Type>
inline Foam::scalar
Foam::species::thermo<Thermo, Type>::Hs(const scalar p, const scalar T) const

View File

@ -53,9 +53,7 @@ void Foam::incompressibleTwoPhaseMixture::calcNu()
Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture
(
const volVectorField& U,
const surfaceScalarField& phi,
const word& alpha1Name,
const word& alpha2Name
const surfaceScalarField& phi
)
:
IOdictionary
@ -69,14 +67,14 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture
IOobject::NO_WRITE
)
),
twoPhaseMixture(U.mesh(), *this, alpha1Name, alpha2Name),
twoPhaseMixture(U.mesh(), *this),
nuModel1_
(
viscosityModel::New
(
"nu1",
subDict(phase1Name_ == "1" ? "phase1": phase1Name_),
subDict(phase1Name_),
U,
phi
)
@ -86,7 +84,7 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture
viscosityModel::New
(
"nu2",
subDict(phase2Name_ == "2" ? "phase2": phase2Name_),
subDict(phase2Name_),
U,
phi
)

View File

@ -86,9 +86,7 @@ public:
incompressibleTwoPhaseMixture
(
const volVectorField& U,
const surfaceScalarField& phi,
const word& alpha1Name = "alpha1",
const word& alpha2Name = "alpha2"
const surfaceScalarField& phi
);

View File

@ -31,29 +31,17 @@ License
Foam::twoPhaseMixture::twoPhaseMixture
(
const fvMesh& mesh,
const dictionary& dict,
const word& alpha1Name,
const word& alpha2Name
const dictionary& dict
)
:
phase1Name_
(
dict.found("phases")
? wordList(dict.lookup("phases"))[0]
: "1"
),
phase2Name_
(
dict.found("phases")
? wordList(dict.lookup("phases"))[1]
: "2"
),
phase1Name_(wordList(dict.lookup("phases"))[0]),
phase2Name_(wordList(dict.lookup("phases"))[1]),
alpha1_
(
IOobject
(
dict.found("phases") ? word("alpha" + phase1Name_) : alpha1Name,
IOobject::groupName("alpha", phase1Name_),
mesh.time().timeName(),
mesh,
IOobject::MUST_READ,
@ -66,7 +54,7 @@ Foam::twoPhaseMixture::twoPhaseMixture
(
IOobject
(
dict.found("phases") ? word("alpha" + phase2Name_) : alpha2Name,
IOobject::groupName("alpha", phase2Name_),
mesh.time().timeName(),
mesh
),

View File

@ -67,9 +67,7 @@ public:
twoPhaseMixture
(
const fvMesh& mesh,
const dictionary& dict,
const word& alpha1Name = "alpha1",
const word& alpha2Name = "alpha2"
const dictionary& dict
);

View File

@ -19,7 +19,7 @@ runParallel snappyHexMesh 8 -overwrite -parallel
find . -type f -iname "*level*" -exec rm {} \;
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1
ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1
runParallel renumberMesh 8 -overwrite

View File

@ -16,7 +16,7 @@ runParallel snappyHexMesh 4 -overwrite
find . -type f -iname "*level*" -exec rm {} \;
ls -d processor* | xargs -i cp -r 0.org/* ./{}/0/ $1
ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1
runParallel topoSet 4
runParallel `getApplication` 4

View File

@ -70,9 +70,8 @@ constantProperties
epsilon0 1;
f0 0.5;
Tvap 273;
Tbp 373;
Pr 0.7;
TDevol 273;
LDevol 0;
hRetentionCoeff 1;

View File

@ -65,8 +65,7 @@ constantProperties
f0 0.5;
Pr 0.7;
Tvap 400;
Tbp 400;
TDevol 400;
LDevol 0;
hRetentionCoeff 1;

View File

@ -68,6 +68,8 @@ subModels
surfaceFilmModel none;
stochasticCollisionModel none;
collisionModel pairCollision;
pairCollisionCoeffs

View File

@ -78,6 +78,8 @@ subModels
surfaceFilmModel none;
stochasticCollisionModel none;
collisionModel pairCollision;
pairCollisionCoeffs

View File

@ -63,8 +63,6 @@ constantProperties
epsilon0 1;
f0 0.5;
Pr 0.7;
Tvap 273;
Tbp 373;
constantVolume false;
}

View File

@ -63,8 +63,6 @@ constantProperties
epsilon0 1;
f0 0.5;
Pr 0.7;
Tvap 273;
Tbp 373;
constantVolume false;
}

View File

@ -63,8 +63,6 @@ constantProperties
epsilon0 1;
f0 0.5;
Pr 0.7;
Tvap 273;
Tbp 373;
constantVolume false;
}

View File

@ -65,8 +65,7 @@ constantProperties
f0 0.5;
Pr 0.7;
Tvap 273;
Tbp 373;
TDevol 273;
LDevol 0;
hRetentionCoeff 1;

View File

@ -64,9 +64,8 @@ constantProperties
epsilon0 1;
f0 0.5;
Tvap 284;
Tbp 373;
Pr 0.7;
TDevol 284;
LDevol 0;
hRetentionCoeff 1;

View File

@ -64,9 +64,8 @@ constantProperties
epsilon0 1;
f0 0.5;
Tvap 273;
Tbp 373;
Pr 0.7;
TDevol 273;
LDevol 0;
hRetentionCoeff 1;

View File

@ -70,9 +70,8 @@ constantProperties
epsilon0 1;
f0 0.5;
Tvap 273;
Tbp 373;
Pr 0.7;
TDevol 273;
LDevol 0;
hRetentionCoeff 1;

View File

@ -68,8 +68,6 @@ constantProperties
epsilon0 1;
f0 0.5;
Pr 0.7;
Tvap 273;
Tbp 373;
constantVolume false;
}

View File

@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # run from this directory
\rm -f constant/triSurface/wigley-scaled-oriented.stl.gz
cleanCase
rm 0/alpha1.gz 0/cellLevel.gz 0/pointLevel.gz constant/polyMesh/boundary \
rm 0/alpha.water.gz 0/cellLevel.gz 0/pointLevel.gz constant/polyMesh/boundary \
> /dev/null 2>&1
# ----------------------------------------------------------------- end-of-file

View File

@ -13,7 +13,7 @@ if [ ! -e log.transformPoints ]
then
transformPoints -scale '(2 1 1)' > log.transformPoints 2>&1
fi
cp 0/alpha1.org 0/alpha1
cp 0/alpha.water.org 0/alpha.water
runApplication setFields
runApplication `getApplication`

View File

@ -15,14 +15,16 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phase1
phases (water air);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
}
phase2
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;

View File

@ -55,7 +55,7 @@ fluxRequired
default no;
p_rgh;
pcorr;
alpha1;
alpha.water;
}

View File

@ -17,7 +17,7 @@ FoamFile
solvers
{
alpha1
alpha.water
{
nAlphaCorr 1;
nAlphaSubCycles 1;

View File

@ -17,7 +17,7 @@ FoamFile
defaultFieldValues
(
volScalarFieldValue alpha1 0
volScalarFieldValue alpha.water 0
);
regions
@ -27,7 +27,7 @@ regions
box (-100 -100 -100) (100 100 0);
fieldValues
(
volScalarFieldValue alpha1 1
volScalarFieldValue alpha.water 1
);
}
);

View File

@ -11,7 +11,7 @@ FoamFile
format ascii;
class volScalarField;
location "0";
object alpha1;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object alpha1;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -15,14 +15,16 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phase1
phases (water oir);
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-4;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
}
phase2
oir
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-4;

View File

@ -53,7 +53,7 @@ fluxRequired
default no;
p_rgh ;
pcorr ;
alpha1 ;
alpha.water ;
}

View File

@ -17,7 +17,7 @@ FoamFile
solvers
{
alpha1
alpha.water
{
nAlphaCorr 1;
nAlphaSubCycles 2;

View File

@ -17,7 +17,7 @@ FoamFile
defaultFieldValues
(
volScalarFieldValue alpha1 0
volScalarFieldValue alpha.water 0
);
regions
@ -27,7 +27,7 @@ regions
box (0 0 -1) (1 1 1);
fieldValues
(
volScalarFieldValue alpha1 1
volScalarFieldValue alpha.water 1
);
}
);

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object gamma;
object alpha.vapour;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -19,14 +19,9 @@ mul mul [ 1 -1 -1 0 0 ] 0.0065;
muv muv [ 1 -1 -1 0 0 ] 5.953e-06;
twoPhase
{
transportModel twoPhase;
phase1 phase1;
phase2 phase2;
}
phases (vapour water);
phase1
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 7.831e-06;
@ -48,7 +43,7 @@ phase1
}
}
phase2
vapour
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 4.252e-05;

View File

@ -73,7 +73,7 @@ functions
base time;
}
gamma
alpha.vapour
{
mean on;
prime2Mean off;

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object gamma;
object alpha.vapour;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,48 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type zeroGradient;
value uniform (0 0 0);
}
outlet
{
type zeroGradient;
value uniform (0 0 0);
}
walls
{
type fixedValue;
value uniform (0 0 0);
}
frontBack
{
type fixedValue;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -1,48 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object gamma;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
walls
{
type calculated;
value uniform 0;
}
frontBack
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -1,47 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0];
internalField uniform 10;
boundaryField
{
inlet
{
type turbulentIntensityKineticEnergyInlet;
intensity 0.05;
value uniform 0.05;
}
outlet
{
type zeroGradient;
}
walls
{
type kqRWallFunction;
value uniform 10;
}
frontBack
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -1,47 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nuSgs;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
walls
{
type nutUSpaldingWallFunction;
value uniform 0;
}
frontBack
{
type nutUSpaldingWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -1,51 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0];
internalField uniform 300e5;
boundaryField
{
inlet
{
type totalPressure;
U U;
phi phiv;
rho rho;
psi none;
gamma 1;
p0 uniform 300e5;
}
outlet
{
type fixedValue;
value uniform 100e5;
}
walls
{
type zeroGradient;
}
frontBack
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -1,46 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object rho;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 0 0 0];
internalField uniform 845;
boundaryField
{
inlet
{
type fixedValue;
value uniform 845;
}
outlet
{
type fixedValue;
value uniform 835;
}
walls
{
type zeroGradient;
}
frontBack
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # run from this directory
rm -rf constant/polyMesh/sets > /dev/null 2>&1
rm -rf 0 > /dev/null 2>&1
cp -r 0.org 0
rm system/topoSetDict > /dev/null 2>&1
rm -rf processor[0-9] > /dev/null 2>&1
cleanCase

View File

@ -19,14 +19,9 @@ mul mul [ 1 -1 -1 0 0 ] 0.0065;
muv muv [ 1 -1 -1 0 0 ] 5.953e-06;
twoPhase
{
transportModel twoPhase;
phase1 phase1;
phase2 phase2;
}
phases (vapour water);
phase1
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 7.831e-06;
@ -48,7 +43,7 @@ phase1
}
}
phase2
vapour
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 4.252e-05;

View File

@ -73,7 +73,7 @@ functions
base time;
}
gamma
alpha.vapour
{
mean on;
prime2Mean off;

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object gamma;
object alpha.vapour;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -19,14 +19,9 @@ mul mul [ 1 -1 -1 0 0 ] 0.0065;
muv muv [ 1 -1 -1 0 0 ] 5.953e-06;
twoPhase
{
transportModel twoPhase;
phase1 phase1;
phase2 phase2;
}
phases (vapour water);
phase1
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 7.831e-06;
@ -48,7 +43,7 @@ phase1
}
}
phase2
vapour
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 4.252e-05;

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
object alphawater;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -3,4 +3,4 @@ cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases
rm -rf processor*
rm -rf 0/p_rgh.gz 0/p.gz 0/alphawater.gz 0/T*.gz
rm -rf 0/p_rgh.gz 0/p.gz 0/alpha.water.gz 0/T*.gz

View File

@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # run from this directory
application=`getApplication`
runApplication blockMesh
cp 0/alphawater.org 0/alphawater
cp 0/alpha.water.org 0/alpha.water
cp 0/p_rgh.org 0/p_rgh
cp 0/p.org 0/p
cp 0/T.org 0/T

View File

@ -31,8 +31,8 @@ divSchemes
div(phirb,alpha) Gauss interfaceCompression 1;
div(rho*phi,U) Gauss upwind;
div(phi,thermo:rhowater) Gauss upwind;
div(phi,thermo:rhoair) Gauss upwind;
div(phi,thermo:rho.water) Gauss upwind;
div(phi,thermo:rho.air) Gauss upwind;
div(rho*phi,T) Gauss upwind;
div(rho*phi,K) Gauss upwind;
div(phi,p) Gauss upwind;

View File

@ -17,7 +17,7 @@ FoamFile
solvers
{
alphawater
alpha.water
{
nAlphaCorr 1;
nAlphaSubCycles 1;

View File

@ -17,7 +17,7 @@ FoamFile
defaultFieldValues
(
volScalarFieldValue alphawater 1
volScalarFieldValue alpha.water 1
volScalarFieldValue p_rgh 1e5
volScalarFieldValue p 1e5
volScalarFieldValue T 300
@ -31,7 +31,7 @@ regions
radius 0.1;
fieldValues
(
volScalarFieldValue alphawater 0
volScalarFieldValue alpha.water 0
volScalarFieldValue p_rgh 1e6
volScalarFieldValue p 1e6
volScalarFieldValue T 578
@ -42,7 +42,7 @@ regions
box (-10 1 -1) (10 10 1);
fieldValues
(
volScalarFieldValue alphawater 0
volScalarFieldValue alpha.water 0
);
}
);

View File

@ -3,6 +3,6 @@ cd ${0%/*} || exit 1 # run from this directory
foamCleanTutorials cases
rm -rf processor*
rm -rf 0/p_rgh.gz 0/p.gz 0/alphawater.gz 0/T.gz
rm -rf 0/p_rgh.gz 0/p.gz 0/alpha.water.gz 0/T.gz
# ----------------------------------------------------------------- end-of-file

View File

@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # run from this directory
application=`getApplication`
runApplication blockMesh
cp 0/alphawater.org 0/alphawater
cp 0/alpha.water.org 0/alpha.water
cp 0/p_rgh.org 0/p_rgh
cp 0/p.org 0/p
cp 0/T.org 0/T

Some files were not shown because too many files have changed in this diff Show More