fvOptions: Changed the source, constraint and correct functions to const
Most fvOptions change the state of the fields and equations they are applied to but do not change internal state so it makes more sense that the interface is const, consistent with MeshObjects. For the few fvOptions which do maintain a changing state the member data is now mutable.
This commit is contained in:
@ -50,7 +50,7 @@
|
|||||||
radiationModel& rad = radiation[i];
|
radiationModel& rad = radiation[i];
|
||||||
|
|
||||||
IOMRFZoneList& MRF = MRFfluid[i];
|
IOMRFZoneList& MRF = MRFfluid[i];
|
||||||
fv::options& fvOptions = fluidFvOptions[i];
|
const fv::options& fvOptions = fluidFvOptions[i];
|
||||||
|
|
||||||
const dimensionedScalar initialMass
|
const dimensionedScalar initialMass
|
||||||
(
|
(
|
||||||
|
|||||||
@ -28,6 +28,6 @@ volScalarField& e = thermo.he();
|
|||||||
|
|
||||||
const volScalarField& betav = betavSolid[i];
|
const volScalarField& betav = betavSolid[i];
|
||||||
|
|
||||||
fv::options& fvOptions = solidHeatSources[i];
|
const fv::options& fvOptions = solidHeatSources[i];
|
||||||
|
|
||||||
solidNoLoopControl& pimple = pimples.solid(i);
|
solidNoLoopControl& pimple = pimples.solid(i);
|
||||||
|
|||||||
@ -48,7 +48,7 @@ namespace Foam
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::fv::VoFSolidificationMeltingSource::update()
|
void Foam::fv::VoFSolidificationMeltingSource::update() const
|
||||||
{
|
{
|
||||||
if (curTimeIndex_ == mesh_.time().timeIndex())
|
if (curTimeIndex_ == mesh_.time().timeIndex())
|
||||||
{
|
{
|
||||||
@ -156,7 +156,7 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
apply(geometricOneField(), eqn);
|
apply(geometricOneField(), eqn);
|
||||||
}
|
}
|
||||||
@ -167,7 +167,7 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
apply(rho, eqn);
|
apply(rho, eqn);
|
||||||
}
|
}
|
||||||
@ -177,7 +177,7 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -209,7 +209,7 @@ void Foam::fv::VoFSolidificationMeltingSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
// Momentum source uses a Boussinesq approximation - redirect
|
// Momentum source uses a Boussinesq approximation - redirect
|
||||||
addSup(eqn, fieldi);
|
addSup(eqn, fieldi);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -117,10 +117,10 @@ class VoFSolidificationMeltingSource
|
|||||||
scalar q_;
|
scalar q_;
|
||||||
|
|
||||||
//- Solid phase fraction
|
//- Solid phase fraction
|
||||||
volScalarField alphaSolid_;
|
mutable volScalarField alphaSolid_;
|
||||||
|
|
||||||
//- Current time index (used for updating)
|
//- Current time index (used for updating)
|
||||||
label curTimeIndex_;
|
mutable label curTimeIndex_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -129,11 +129,11 @@ class VoFSolidificationMeltingSource
|
|||||||
word alphaSolidName() const;
|
word alphaSolidName() const;
|
||||||
|
|
||||||
//- Update the model
|
//- Update the model
|
||||||
void update();
|
void update() const;
|
||||||
|
|
||||||
//- Helper function to apply to the energy equation
|
//- Helper function to apply to the energy equation
|
||||||
template<class RhoFieldType>
|
template<class RhoFieldType>
|
||||||
void apply(const RhoFieldType& rho, fvMatrix<scalar>& eqn);
|
void apply(const RhoFieldType& rho, fvMatrix<scalar>& eqn) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -165,10 +165,18 @@ public:
|
|||||||
// Add explicit and implicit contributions
|
// Add explicit and implicit contributions
|
||||||
|
|
||||||
//- Add explicit contribution to enthalpy equation
|
//- Add explicit contribution to enthalpy equation
|
||||||
virtual void addSup(fvMatrix<scalar>& eqn, const label fieldi);
|
virtual void addSup
|
||||||
|
(
|
||||||
|
fvMatrix<scalar>& eqn,
|
||||||
|
const label fieldi
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Add implicit contribution to momentum equation
|
//- Add implicit contribution to momentum equation
|
||||||
virtual void addSup(fvMatrix<vector>& eqn, const label fieldi);
|
virtual void addSup
|
||||||
|
(
|
||||||
|
fvMatrix<vector>& eqn,
|
||||||
|
const label fieldi
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Add explicit and implicit contributions to compressible equation
|
// Add explicit and implicit contributions to compressible equation
|
||||||
@ -179,7 +187,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Add implicit contribution to compressible momentum equation
|
//- Add implicit contribution to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -187,7 +195,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,7 +33,7 @@ void Foam::fv::VoFSolidificationMeltingSource::apply
|
|||||||
(
|
(
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
fvMatrix<scalar>& eqn
|
fvMatrix<scalar>& eqn
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -477,7 +477,7 @@ void Foam::RASModels::kineticTheoryModel::correct()
|
|||||||
// 'thermal' conductivity (Table 3.3, p. 49)
|
// 'thermal' conductivity (Table 3.3, p. 49)
|
||||||
kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
|
kappa_ = conductivityModel_->kappa(alpha, Theta_, gs0_, rho, da, e_);
|
||||||
|
|
||||||
fv::options& fvOptions(fv::options::New(mesh_));
|
const fv::options& fvOptions(fv::options::New(mesh_));
|
||||||
|
|
||||||
// Construct the granular temperature equation (Eq. 3.20, p. 44)
|
// Construct the granular temperature equation (Eq. 3.20, p. 44)
|
||||||
// NB. note that there are two typos in Eq. 3.20:
|
// NB. note that there are two typos in Eq. 3.20:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
surfaceScalarField& phi = fluid.phi();
|
surfaceScalarField& phi = fluid.phi();
|
||||||
|
|
||||||
const IOMRFZoneList& MRF = fluid.MRF();
|
const IOMRFZoneList& MRF = fluid.MRF();
|
||||||
fv::options& fvOptions = fluid.fvOptions();
|
const fv::options& fvOptions = fluid.fvOptions();
|
||||||
|
|||||||
@ -144,7 +144,7 @@ void Foam::diameterModels::IATE::correct()
|
|||||||
R += sources_[j].R(alphaAv, kappai_);
|
R += sources_[j].R(alphaAv, kappai_);
|
||||||
}
|
}
|
||||||
|
|
||||||
fv::options& fvOptions(fv::options::New(phase().mesh()));
|
const fv::options& fvOptions(fv::options::New(phase().mesh()));
|
||||||
|
|
||||||
// Construct the interfacial curvature equation
|
// Construct the interfacial curvature equation
|
||||||
fvScalarMatrix kappaiEqn
|
fvScalarMatrix kappaiEqn
|
||||||
|
|||||||
@ -436,7 +436,7 @@ public:
|
|||||||
inline const IOMRFZoneList& MRF() const;
|
inline const IOMRFZoneList& MRF() const;
|
||||||
|
|
||||||
//- Access the fvOptions
|
//- Access the fvOptions
|
||||||
inline fv::options& fvOptions() const;
|
inline const fv::options& fvOptions() const;
|
||||||
|
|
||||||
|
|
||||||
// Sub-model lookup
|
// Sub-model lookup
|
||||||
|
|||||||
@ -161,7 +161,7 @@ inline const Foam::IOMRFZoneList& Foam::phaseSystem::MRF() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::fv::options& Foam::phaseSystem::fvOptions() const
|
inline const Foam::fv::options& Foam::phaseSystem::fvOptions() const
|
||||||
{
|
{
|
||||||
return fv::options::New(mesh_);
|
return fv::options::New(mesh_);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,7 +131,7 @@ ${typeName}FvOption${SourceType}::
|
|||||||
void ${typeName}FvOption${SourceType}::correct
|
void ${typeName}FvOption${SourceType}::correct
|
||||||
(
|
(
|
||||||
GeometricField<${TemplateType}, fvPatchField, volMesh>& fld
|
GeometricField<${TemplateType}, fvPatchField, volMesh>& fld
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -148,7 +148,7 @@ void ${typeName}FvOption${SourceType}::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<${TemplateType}>& eqn,
|
fvMatrix<${TemplateType}>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -166,7 +166,7 @@ void ${typeName}FvOption${SourceType}::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<${TemplateType}>& eqn,
|
fvMatrix<${TemplateType}>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
@ -183,7 +183,7 @@ void ${typeName}FvOption${SourceType}::constrain
|
|||||||
(
|
(
|
||||||
fvMatrix<${TemplateType}>& eqn,
|
fvMatrix<${TemplateType}>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (${verbose:-false})
|
if (${verbose:-false})
|
||||||
{
|
{
|
||||||
|
|||||||
@ -144,14 +144,14 @@ public:
|
|||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
(
|
||||||
GeometricField<${TemplateType}, fvPatchField, volMesh>&
|
GeometricField<${TemplateType}, fvPatchField, volMesh>&
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Explicit and implicit matrix contributions
|
//- Explicit and implicit matrix contributions
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<${TemplateType}>& eqn,
|
fvMatrix<${TemplateType}>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Explicit and implicit matrix contributions for compressible
|
//- Explicit and implicit matrix contributions for compressible
|
||||||
// equations
|
// equations
|
||||||
@ -160,14 +160,14 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<${TemplateType}>& eqn,
|
fvMatrix<${TemplateType}>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Set value
|
//- Set value
|
||||||
virtual void constrain
|
virtual void constrain
|
||||||
(
|
(
|
||||||
fvMatrix<${TemplateType}>& eqn,
|
fvMatrix<${TemplateType}>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -429,7 +429,7 @@ void kOmegaSST<MomentumTransportModel, BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
BasicMomentumTransportModel::correct();
|
BasicMomentumTransportModel::correct();
|
||||||
|
|
||||||
|
|||||||
@ -163,7 +163,7 @@ void DeardorffDiffStress<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volSymmTensorField& R = this->R_;
|
volSymmTensorField& R = this->R_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
ReynoldsStress<LESModel<BasicMomentumTransportModel>>::correct();
|
ReynoldsStress<LESModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -454,7 +454,7 @@ void SpalartAllmarasDES<BasicMomentumTransportModel>::correct()
|
|||||||
const rhoField& rho = this->rho_;
|
const rhoField& rho = this->rho_;
|
||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
LESeddyViscosity<BasicMomentumTransportModel>::correct();
|
LESeddyViscosity<BasicMomentumTransportModel>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -233,7 +233,7 @@ void dynamicKEqn<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
LESeddyViscosity<BasicMomentumTransportModel>::correct();
|
LESeddyViscosity<BasicMomentumTransportModel>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -159,7 +159,7 @@ void dynamicLagrangian<BasicMomentumTransportModel>::correct()
|
|||||||
const rhoField& rho = this->rho_;
|
const rhoField& rho = this->rho_;
|
||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
LESeddyViscosity<BasicMomentumTransportModel>::correct();
|
LESeddyViscosity<BasicMomentumTransportModel>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -159,7 +159,7 @@ void kEqn<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
LESeddyViscosity<BasicMomentumTransportModel>::correct();
|
LESeddyViscosity<BasicMomentumTransportModel>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -272,7 +272,7 @@ void LRR<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volSymmTensorField& R = this->R_;
|
volSymmTensorField& R = this->R_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
ReynoldsStress<RASModel<BasicMomentumTransportModel>>::correct();
|
ReynoldsStress<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -246,7 +246,7 @@ void LaunderSharmaKE<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -248,7 +248,7 @@ void RNGkEpsilon<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -282,7 +282,7 @@ void SSG<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volSymmTensorField& R = this->R_;
|
volSymmTensorField& R = this->R_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
ReynoldsStress<RASModel<BasicMomentumTransportModel>>::correct();
|
ReynoldsStress<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -355,7 +355,7 @@ void SpalartAllmaras<BasicMomentumTransportModel>::correct()
|
|||||||
const alphaField& alpha = this->alpha_;
|
const alphaField& alpha = this->alpha_;
|
||||||
const rhoField& rho = this->rho_;
|
const rhoField& rho = this->rho_;
|
||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -227,7 +227,7 @@ void kEpsilon<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -216,7 +216,7 @@ void kOmega<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -497,7 +497,7 @@ void kOmegaSSTLM<BasicMomentumTransportModel>::correctReThetatGammaInt()
|
|||||||
const tmp<volScalarField> tnu = this->nu();
|
const tmp<volScalarField> tnu = this->nu();
|
||||||
const volScalarField::Internal& nu = tnu()();
|
const volScalarField::Internal& nu = tnu()();
|
||||||
const volScalarField::Internal& y = this->y_();
|
const volScalarField::Internal& y = this->y_();
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
// Fields derived from the velocity gradient
|
// Fields derived from the velocity gradient
|
||||||
tmp<volTensorField> tgradU = fvc::grad(U);
|
tmp<volTensorField> tgradU = fvc::grad(U);
|
||||||
|
|||||||
@ -256,7 +256,7 @@ void realizableKE<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -282,7 +282,7 @@ void v2f<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -322,7 +322,7 @@ void Maxwell<BasicMomentumTransportModel>::correct()
|
|||||||
const rhoField& rho = this->rho_;
|
const rhoField& rho = this->rho_;
|
||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
laminarModel<BasicMomentumTransportModel>::correct();
|
laminarModel<BasicMomentumTransportModel>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -596,7 +596,7 @@ void mixtureKEpsilon<BasicMomentumTransportModel>::correct()
|
|||||||
volScalarField& km = km_();
|
volScalarField& km = km_();
|
||||||
volScalarField& epsilonm = epsilonm_();
|
volScalarField& epsilonm = epsilonm_();
|
||||||
|
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -98,7 +98,7 @@ template<class BasicMomentumTransportModel>
|
|||||||
void kEpsilonLopesdaCosta<BasicMomentumTransportModel>::
|
void kEpsilonLopesdaCosta<BasicMomentumTransportModel>::
|
||||||
setPorosityCoefficients()
|
setPorosityCoefficients()
|
||||||
{
|
{
|
||||||
fv::options::optionList& fvOptions(fv::options::New(this->mesh_));
|
const fv::options::optionList& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
forAll(fvOptions, i)
|
forAll(fvOptions, i)
|
||||||
{
|
{
|
||||||
@ -398,7 +398,7 @@ void kEpsilonLopesdaCosta<BasicMomentumTransportModel>::correct()
|
|||||||
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
|
||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
fv::options& fvOptions(fv::options::New(this->mesh_));
|
const fv::options& fvOptions(fv::options::New(this->mesh_));
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
eddyViscosity<RASModel<BasicMomentumTransportModel>>::correct();
|
||||||
|
|
||||||
|
|||||||
@ -104,7 +104,7 @@ Foam::fv::option::~option()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::fv::option::isActive()
|
bool Foam::fv::option::isActive() const
|
||||||
{
|
{
|
||||||
return active_;
|
return active_;
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ void Foam::fv::option::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ void Foam::fv::option::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ void Foam::fv::option::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ void Foam::fv::option::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ void Foam::fv::option::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSup(alpha*rho, eqn, fieldi);
|
addSup(alpha*rho, eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSup(alpha*rho, eqn, fieldi);
|
addSup(alpha*rho, eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -245,7 +245,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSup(alpha*rho, eqn, fieldi);
|
addSup(alpha*rho, eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -257,7 +257,7 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSup(alpha*rho, eqn, fieldi);
|
addSup(alpha*rho, eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -269,17 +269,25 @@ void Foam::fv::option::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSup(alpha*rho, eqn, fieldi);
|
addSup(alpha*rho, eqn, fieldi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::constrain(fvMatrix<scalar>& eqn, const label fieldi)
|
void Foam::fv::option::constrain
|
||||||
|
(
|
||||||
|
fvMatrix<scalar>& eqn,
|
||||||
|
const label fieldi
|
||||||
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::constrain(fvMatrix<vector>& eqn, const label fieldi)
|
void Foam::fv::option::constrain
|
||||||
|
(
|
||||||
|
fvMatrix<vector>& eqn,
|
||||||
|
const label fieldi
|
||||||
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -287,7 +295,7 @@ void Foam::fv::option::constrain
|
|||||||
(
|
(
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -295,31 +303,34 @@ void Foam::fv::option::constrain
|
|||||||
(
|
(
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::constrain(fvMatrix<tensor>& eqn, const label fieldi)
|
void Foam::fv::option::constrain
|
||||||
|
(
|
||||||
|
fvMatrix<tensor>& eqn, const label fieldi
|
||||||
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::correct(volScalarField& field)
|
void Foam::fv::option::correct(volScalarField& field) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::correct(volVectorField& field)
|
void Foam::fv::option::correct(volVectorField& field) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::correct(volSphericalTensorField& field)
|
void Foam::fv::option::correct(volSphericalTensorField& field) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::correct(volSymmTensorField& field)
|
void Foam::fv::option::correct(volSymmTensorField& field) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::option::correct(volTensorField& field)
|
void Foam::fv::option::correct(volTensorField& field) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,6 @@ SourceFiles
|
|||||||
#include "volFieldsFwd.H"
|
#include "volFieldsFwd.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "Switch.H"
|
#include "Switch.H"
|
||||||
#include "runTimeSelectionTables.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -93,7 +92,7 @@ protected:
|
|||||||
wordList fieldNames_;
|
wordList fieldNames_;
|
||||||
|
|
||||||
//- Applied flag list - corresponds to each fieldNames_ entry
|
//- Applied flag list - corresponds to each fieldNames_ entry
|
||||||
List<bool> applied_;
|
mutable List<bool> applied_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -203,7 +202,7 @@ public:
|
|||||||
inline bool active() const;
|
inline bool active() const;
|
||||||
|
|
||||||
//- Set the applied flag to true for field index fieldi
|
//- Set the applied flag to true for field index fieldi
|
||||||
inline void setApplied(const label fieldi);
|
inline void setApplied(const label fieldi) const;
|
||||||
|
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
@ -215,7 +214,7 @@ public:
|
|||||||
// Checks
|
// Checks
|
||||||
|
|
||||||
//- Is the source active?
|
//- Is the source active?
|
||||||
virtual bool isActive();
|
virtual bool isActive() const;
|
||||||
|
|
||||||
//- Return index of field name if found in fieldNames list
|
//- Return index of field name if found in fieldNames list
|
||||||
virtual label applyToField(const word& fieldName) const;
|
virtual label applyToField(const word& fieldName) const;
|
||||||
@ -232,31 +231,31 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Explicit and implicit sources for compressible equations
|
// Explicit and implicit sources for compressible equations
|
||||||
@ -266,35 +265,35 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Explicit and implicit sources for phase equations
|
// Explicit and implicit sources for phase equations
|
||||||
@ -305,7 +304,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -313,7 +312,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -321,7 +320,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -329,7 +328,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -337,7 +336,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Constraints
|
// Constraints
|
||||||
@ -346,40 +345,40 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void constrain
|
virtual void constrain
|
||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void constrain
|
virtual void constrain
|
||||||
(
|
(
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void constrain
|
virtual void constrain
|
||||||
(
|
(
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void constrain
|
virtual void constrain
|
||||||
(
|
(
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Correction
|
// Correction
|
||||||
|
|
||||||
virtual void correct(volScalarField& field);
|
virtual void correct(volScalarField& field) const;
|
||||||
virtual void correct(volVectorField& field);
|
virtual void correct(volVectorField& field) const;
|
||||||
virtual void correct(volSphericalTensorField& field);
|
virtual void correct(volSphericalTensorField& field) const;
|
||||||
virtual void correct(volSymmTensorField& field);
|
virtual void correct(volSymmTensorField& field) const;
|
||||||
virtual void correct(volTensorField& field);
|
virtual void correct(volTensorField& field) const;
|
||||||
|
|
||||||
|
|
||||||
// Mesh changes
|
// Mesh changes
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,7 @@ inline bool Foam::fv::option::active() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void Foam::fv::option::setApplied(const label fieldi)
|
inline void Foam::fv::option::setApplied(const label fieldi) const
|
||||||
{
|
{
|
||||||
applied_[fieldi] = true;
|
applied_[fieldi] = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,7 +92,7 @@ protected:
|
|||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const dimensionSet& ds
|
const dimensionSet& ds
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -142,7 +142,7 @@ public:
|
|||||||
tmp<fvMatrix<Type>> operator()
|
tmp<fvMatrix<Type>> operator()
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation with specified name
|
//- Return source for equation with specified name
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -150,7 +150,7 @@ public:
|
|||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation
|
//- Return source for equation
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -158,7 +158,7 @@ public:
|
|||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation with specified name
|
//- Return source for equation with specified name
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -167,7 +167,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation
|
//- Return source for equation
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -176,7 +176,7 @@ public:
|
|||||||
const volScalarField& alpha,
|
const volScalarField& alpha,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation with specified name
|
//- Return source for equation with specified name
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -186,7 +186,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation
|
//- Return source for equation
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -195,7 +195,7 @@ public:
|
|||||||
const volScalarField& alpha,
|
const volScalarField& alpha,
|
||||||
const geometricOneField& rho,
|
const geometricOneField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation
|
//- Return source for equation
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -204,7 +204,7 @@ public:
|
|||||||
const geometricOneField& alpha,
|
const geometricOneField& alpha,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation
|
//- Return source for equation
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -213,14 +213,14 @@ public:
|
|||||||
const geometricOneField& alpha,
|
const geometricOneField& alpha,
|
||||||
const geometricOneField& rho,
|
const geometricOneField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation with second time derivative
|
//- Return source for equation with second time derivative
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type>> d2dt2
|
tmp<fvMatrix<Type>> d2dt2
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Return source for equation with second time derivative
|
//- Return source for equation with second time derivative
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -228,21 +228,24 @@ public:
|
|||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Constraints
|
// Constraints
|
||||||
|
|
||||||
//- Apply constraints to equation
|
//- Apply constraints to equation
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void constrain(fvMatrix<Type>& eqn);
|
void constrain(fvMatrix<Type>& eqn) const;
|
||||||
|
|
||||||
|
|
||||||
// Correction
|
// Correction
|
||||||
|
|
||||||
//- Apply correction to field
|
//- Apply correction to field
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void correct(GeometricField<Type, fvPatchField, volMesh>& field);
|
void correct
|
||||||
|
(
|
||||||
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Mesh changes
|
// Mesh changes
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -31,7 +31,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::source
|
|||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const dimensionSet& ds
|
const dimensionSet& ds
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
checkApplied();
|
checkApplied();
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::source
|
|||||||
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
option& source = this->operator[](i);
|
const option& source = this->operator[](i);
|
||||||
|
|
||||||
label fieldi = source.applyToField(fieldName);
|
label fieldi = source.applyToField(fieldName);
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ template<class Type>
|
|||||||
Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
return this->operator()(field, field.name());
|
return this->operator()(field, field.name());
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
return source(field, fieldName, field.dimensions()/dimTime*dimVolume);
|
return source(field, fieldName, field.dimensions()/dimTime*dimVolume);
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
return this->operator()(rho, field, field.name());
|
return this->operator()(rho, field, field.name());
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
checkApplied();
|
checkApplied();
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
option& source = this->operator[](i);
|
const option& source = this->operator[](i);
|
||||||
|
|
||||||
label fieldi = source.applyToField(fieldName);
|
label fieldi = source.applyToField(fieldName);
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
const volScalarField& alpha,
|
const volScalarField& alpha,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
return this->operator()(alpha, rho, field, field.name());
|
return this->operator()(alpha, rho, field, field.name());
|
||||||
}
|
}
|
||||||
@ -161,7 +161,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
checkApplied();
|
checkApplied();
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
option& source = this->operator[](i);
|
const option& source = this->operator[](i);
|
||||||
|
|
||||||
label fieldi = source.applyToField(fieldName);
|
label fieldi = source.applyToField(fieldName);
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
const geometricOneField& alpha,
|
const geometricOneField& alpha,
|
||||||
const geometricOneField& rho,
|
const geometricOneField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
return this->operator()(field, field.name());
|
return this->operator()(field, field.name());
|
||||||
}
|
}
|
||||||
@ -219,7 +219,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
const volScalarField& alpha,
|
const volScalarField& alpha,
|
||||||
const geometricOneField& rho,
|
const geometricOneField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
volScalarField one
|
volScalarField one
|
||||||
(
|
(
|
||||||
@ -246,7 +246,7 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::operator()
|
|||||||
const geometricOneField& alpha,
|
const geometricOneField& alpha,
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
return this->operator()(rho, field, field.name());
|
return this->operator()(rho, field, field.name());
|
||||||
}
|
}
|
||||||
@ -256,7 +256,7 @@ template<class Type>
|
|||||||
Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::d2dt2
|
Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::d2dt2
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
return this->d2dt2(field, field.name());
|
return this->d2dt2(field, field.name());
|
||||||
}
|
}
|
||||||
@ -267,20 +267,20 @@ Foam::tmp<Foam::fvMatrix<Type>> Foam::fv::optionList::d2dt2
|
|||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field,
|
GeometricField<Type, fvPatchField, volMesh>& field,
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
return source(field, fieldName, field.dimensions()/sqr(dimTime)*dimVolume);
|
return source(field, fieldName, field.dimensions()/sqr(dimTime)*dimVolume);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::fv::optionList::constrain(fvMatrix<Type>& eqn)
|
void Foam::fv::optionList::constrain(fvMatrix<Type>& eqn) const
|
||||||
{
|
{
|
||||||
checkApplied();
|
checkApplied();
|
||||||
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
option& source = this->operator[](i);
|
const option& source = this->operator[](i);
|
||||||
|
|
||||||
label fieldi = source.applyToField(eqn.psi().name());
|
label fieldi = source.applyToField(eqn.psi().name());
|
||||||
|
|
||||||
@ -307,13 +307,13 @@ template<class Type>
|
|||||||
void Foam::fv::optionList::correct
|
void Foam::fv::optionList::correct
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const word& fieldName = field.name();
|
const word& fieldName = field.name();
|
||||||
|
|
||||||
forAll(*this, i)
|
forAll(*this, i)
|
||||||
{
|
{
|
||||||
option& source = this->operator[](i);
|
const option& source = this->operator[](i);
|
||||||
|
|
||||||
label fieldi = source.applyToField(fieldName);
|
label fieldi = source.applyToField(fieldName);
|
||||||
|
|
||||||
|
|||||||
@ -75,17 +75,7 @@ public:
|
|||||||
//- Disallow default bitwise copy construction
|
//- Disallow default bitwise copy construction
|
||||||
options(const options&) = delete;
|
options(const options&) = delete;
|
||||||
|
|
||||||
// using MeshObject<fvMesh, UpdateableMeshObject, options>::New;
|
using MeshObject<fvMesh, UpdateableMeshObject, options>::New;
|
||||||
|
|
||||||
//- Construct fvOptions and register to datbase if not present
|
|
||||||
// otherwise lookup and return
|
|
||||||
static options& New(const fvMesh& mesh)
|
|
||||||
{
|
|
||||||
return const_cast<options&>
|
|
||||||
(
|
|
||||||
MeshObject<fvMesh, UpdateableMeshObject, options>::New(mesh)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
fv::options& fvOptions(fv::options::New(mesh));
|
const fv::options& fvOptions(fv::options::New(mesh));
|
||||||
|
|
||||||
if (!fvOptions.optionList::size())
|
if (!fvOptions.optionList::size())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -215,7 +215,7 @@ Foam::fv::cellSetOption::~cellSetOption()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
bool Foam::fv::cellSetOption::isActive()
|
bool Foam::fv::cellSetOption::isActive() const
|
||||||
{
|
{
|
||||||
if (option::isActive() && inTimeLimits(mesh_.time().value()))
|
if (option::isActive() && inTimeLimits(mesh_.time().value()))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -185,7 +185,7 @@ public:
|
|||||||
// Checks
|
// Checks
|
||||||
|
|
||||||
//- Is the source active?
|
//- Is the source active?
|
||||||
virtual bool isActive();
|
virtual bool isActive() const;
|
||||||
|
|
||||||
|
|
||||||
// Mesh changes
|
// Mesh changes
|
||||||
|
|||||||
@ -115,7 +115,7 @@ void Foam::fv::fixedTemperatureConstraint::constrain
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label
|
const label
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const basicThermo& thermo =
|
const basicThermo& thermo =
|
||||||
mesh_.lookupObject<basicThermo>
|
mesh_.lookupObject<basicThermo>
|
||||||
|
|||||||
@ -140,7 +140,11 @@ public:
|
|||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Constrain energy equation to fix the temperature
|
//- Constrain energy equation to fix the temperature
|
||||||
virtual void constrain(fvMatrix<scalar>& eqn, const label fieldi);
|
virtual void constrain
|
||||||
|
(
|
||||||
|
fvMatrix<scalar>& eqn,
|
||||||
|
const label fieldi
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Read dictionary
|
//- Read dictionary
|
||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|||||||
@ -81,7 +81,7 @@ void Foam::fv::FixedValueConstraint<Type>::constrain
|
|||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
DebugInfo
|
DebugInfo
|
||||||
<< "FixedValueConstraint<"
|
<< "FixedValueConstraint<"
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -105,7 +105,7 @@ public:
|
|||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|
||||||
//- Set value on field
|
//- Set value on field
|
||||||
virtual void constrain(fvMatrix<Type>& eqn, const label fieldi);
|
virtual void constrain(fvMatrix<Type>& eqn, const label fieldi) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -92,7 +92,7 @@ bool Foam::fv::limitTemperature::read(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::limitTemperature::correct(volScalarField& he)
|
void Foam::fv::limitTemperature::correct(volScalarField& he) const
|
||||||
{
|
{
|
||||||
const basicThermo& thermo =
|
const basicThermo& thermo =
|
||||||
mesh_.lookupObject<basicThermo>
|
mesh_.lookupObject<basicThermo>
|
||||||
|
|||||||
@ -114,7 +114,7 @@ public:
|
|||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|
||||||
//- Correct the energy field
|
//- Correct the energy field
|
||||||
virtual void correct(volScalarField& he);
|
virtual void correct(volScalarField& he) const;
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|||||||
@ -80,7 +80,7 @@ bool Foam::fv::limitVelocity::read(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::limitVelocity::correct(volVectorField& U)
|
void Foam::fv::limitVelocity::correct(volVectorField& U) const
|
||||||
{
|
{
|
||||||
const scalar maxSqrU = sqr(max_);
|
const scalar maxSqrU = sqr(max_);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -108,7 +108,7 @@ public:
|
|||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|
||||||
//- Correct the energy field
|
//- Correct the energy field
|
||||||
virtual void correct(volVectorField& U);
|
virtual void correct(volVectorField& U) const;
|
||||||
|
|
||||||
|
|
||||||
// Member Operators
|
// Member Operators
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,7 +64,7 @@ void Foam::fv::accelerationSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add(geometricOneField(), eqn, fieldi);
|
add(geometricOneField(), eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ void Foam::fv::accelerationSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add(rho, eqn, fieldi);
|
add(rho, eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ void Foam::fv::accelerationSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add((alpha*rho)(), eqn, fieldi);
|
add((alpha*rho)(), eqn, fieldi);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -89,7 +89,7 @@ class accelerationSource
|
|||||||
const AlphaRhoFieldType& rho,
|
const AlphaRhoFieldType& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to compressible momentum equation
|
//- Source term to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -132,7 +132,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to phase momentum equation
|
//- Source term to phase momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -141,7 +141,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -31,7 +31,7 @@ void Foam::fv::accelerationSource::add
|
|||||||
const AlphaRhoFieldType& alphaRho,
|
const AlphaRhoFieldType& alphaRho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const DimensionedField<scalar, volMesh>& V = mesh_.V();
|
const DimensionedField<scalar, volMesh>& V = mesh_.V();
|
||||||
|
|
||||||
|
|||||||
@ -113,7 +113,7 @@ void Foam::fv::actuationDiskSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const scalarField& cellsV = mesh_.V();
|
const scalarField& cellsV = mesh_.V();
|
||||||
vectorField& Usource = eqn.source();
|
vectorField& Usource = eqn.source();
|
||||||
@ -138,7 +138,7 @@ void Foam::fv::actuationDiskSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const scalarField& cellsV = mesh_.V();
|
const scalarField& cellsV = mesh_.V();
|
||||||
vectorField& Usource = eqn.source();
|
vectorField& Usource = eqn.source();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -187,7 +187,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to compressible momentum equation
|
//- Source term to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -195,7 +195,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,7 +77,7 @@ void Foam::fv::buoyancyEnergy::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const uniformDimensionedVectorField& g =
|
const uniformDimensionedVectorField& g =
|
||||||
mesh_.lookupObject<uniformDimensionedVectorField>("g");
|
mesh_.lookupObject<uniformDimensionedVectorField>("g");
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -86,7 +86,7 @@ void Foam::fv::buoyancyForce::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
eqn += g_;
|
eqn += g_;
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ void Foam::fv::buoyancyForce::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
eqn += rho*g_;
|
eqn += rho*g_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -95,7 +95,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Add explicit contribution to compressible momentum equation
|
//- Add explicit contribution to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -103,7 +103,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ void Foam::fv::isotropicDamping::add
|
|||||||
(
|
(
|
||||||
const volScalarField::Internal& forceCoeff,
|
const volScalarField::Internal& forceCoeff,
|
||||||
fvMatrix<vector>& eqn
|
fvMatrix<vector>& eqn
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
eqn -= fvm::Sp(forceCoeff, eqn.psi());
|
eqn -= fvm::Sp(forceCoeff, eqn.psi());
|
||||||
eqn += forceCoeff*value_;
|
eqn += forceCoeff*value_;
|
||||||
@ -76,7 +76,7 @@ void Foam::fv::isotropicDamping::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add(this->forceCoeff(), eqn);
|
add(this->forceCoeff(), eqn);
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ void Foam::fv::isotropicDamping::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add(rho*forceCoeff(), eqn);
|
add(rho*forceCoeff(), eqn);
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ void Foam::fv::isotropicDamping::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add(alpha()*rho()*this->forceCoeff(), eqn);
|
add(alpha()*rho()*this->forceCoeff(), eqn);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -129,7 +129,7 @@ class isotropicDamping
|
|||||||
(
|
(
|
||||||
const volScalarField::Internal& forceCoeff,
|
const volScalarField::Internal& forceCoeff,
|
||||||
fvMatrix<vector>& eqn
|
fvMatrix<vector>& eqn
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -164,7 +164,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to compressible momentum equation
|
//- Source term to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -172,7 +172,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to phase momentum equation
|
//- Source term to phase momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ void Foam::fv::verticalDamping::add
|
|||||||
(
|
(
|
||||||
const volVectorField& alphaRhoU,
|
const volVectorField& alphaRhoU,
|
||||||
fvMatrix<vector>& eqn
|
fvMatrix<vector>& eqn
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const uniformDimensionedVectorField& g =
|
const uniformDimensionedVectorField& g =
|
||||||
mesh_.lookupObject<uniformDimensionedVectorField>("g");
|
mesh_.lookupObject<uniformDimensionedVectorField>("g");
|
||||||
@ -79,7 +79,7 @@ void Foam::fv::verticalDamping::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add(eqn.psi(), eqn);
|
add(eqn.psi(), eqn);
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ void Foam::fv::verticalDamping::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add(rho*eqn.psi(), eqn);
|
add(rho*eqn.psi(), eqn);
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ void Foam::fv::verticalDamping::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
add(alpha*rho*eqn.psi(), eqn);
|
add(alpha*rho*eqn.psi(), eqn);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -133,7 +133,7 @@ class verticalDamping
|
|||||||
(
|
(
|
||||||
const volVectorField& alphaRhoU,
|
const volVectorField& alphaRhoU,
|
||||||
fvMatrix<vector>& eqn
|
fvMatrix<vector>& eqn
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -168,7 +168,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to compressible momentum equation
|
//- Source term to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -176,7 +176,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to phase momentum equation
|
//- Source term to phase momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void Foam::fv::effectivenessHeatExchangerSource::initialise()
|
|||||||
void Foam::fv::effectivenessHeatExchangerSource::calculateTotalArea
|
void Foam::fv::effectivenessHeatExchangerSource::calculateTotalArea
|
||||||
(
|
(
|
||||||
scalar& area
|
scalar& area
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
area = 0;
|
area = 0;
|
||||||
forAll(faceId_, i)
|
forAll(faceId_, i)
|
||||||
@ -198,7 +198,7 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label
|
const label
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const basicThermo& thermo =
|
const basicThermo& thermo =
|
||||||
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
|
mesh_.lookupObject<basicThermo>(basicThermo::dictName);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -201,7 +201,7 @@ private:
|
|||||||
void initialise();
|
void initialise();
|
||||||
|
|
||||||
//- Calculate total area of faceZone across processors
|
//- Calculate total area of faceZone across processors
|
||||||
void calculateTotalArea(scalar& area);
|
void calculateTotalArea(scalar& area) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -242,7 +242,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
}
|
}
|
||||||
@ -256,7 +256,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -80,7 +80,7 @@ void Foam::fv::explicitPorositySource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
||||||
porosityPtr_->addResistance(porosityEqn);
|
porosityPtr_->addResistance(porosityEqn);
|
||||||
@ -93,7 +93,7 @@ void Foam::fv::explicitPorositySource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
||||||
porosityPtr_->addResistance(porosityEqn);
|
porosityPtr_->addResistance(porosityEqn);
|
||||||
@ -107,7 +107,7 @@ void Foam::fv::explicitPorositySource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
fvMatrix<vector> porosityEqn(eqn.psi(), eqn.dimensions());
|
||||||
porosityPtr_->addResistance(porosityEqn);
|
porosityPtr_->addResistance(porosityEqn);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -91,7 +91,7 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Run-time selectable porosity model
|
//- Run-time selectable porosity model
|
||||||
autoPtr<porosityModel> porosityPtr_;
|
mutable autoPtr<porosityModel> porosityPtr_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -134,7 +134,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Add implicit contribution to compressible momentum equation
|
//- Add implicit contribution to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -142,7 +142,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Add implicit contribution to phase momentum equation
|
//- Add implicit contribution to phase momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -151,7 +151,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -147,7 +147,7 @@ Foam::scalar Foam::fv::meanVelocityForce::magUbarAve
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::meanVelocityForce::correct(volVectorField& U)
|
void Foam::fv::meanVelocityForce::correct(volVectorField& U) const
|
||||||
{
|
{
|
||||||
const scalarField& rAU = rAPtr_();
|
const scalarField& rAU = rAPtr_();
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ void Foam::fv::meanVelocityForce::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
volVectorField::Internal Su
|
volVectorField::Internal Su
|
||||||
(
|
(
|
||||||
@ -224,7 +224,7 @@ void Foam::fv::meanVelocityForce::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
this->addSup(eqn, fieldi);
|
this->addSup(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -234,7 +234,7 @@ void Foam::fv::meanVelocityForce::constrain
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label
|
const label
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (rAPtr_.empty())
|
if (rAPtr_.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,10 +77,10 @@ protected:
|
|||||||
vector Ubar_;
|
vector Ubar_;
|
||||||
|
|
||||||
//- Pressure gradient before correction
|
//- Pressure gradient before correction
|
||||||
scalar gradP0_;
|
mutable scalar gradP0_;
|
||||||
|
|
||||||
//- Change in pressure gradient
|
//- Change in pressure gradient
|
||||||
scalar dGradP_;
|
mutable scalar dGradP_;
|
||||||
|
|
||||||
//- Flow direction
|
//- Flow direction
|
||||||
vector flowDir_;
|
vector flowDir_;
|
||||||
@ -89,7 +89,7 @@ protected:
|
|||||||
scalar relaxation_;
|
scalar relaxation_;
|
||||||
|
|
||||||
//- Matrix 1/A coefficients field pointer
|
//- Matrix 1/A coefficients field pointer
|
||||||
autoPtr<volScalarField> rAPtr_;
|
mutable autoPtr<volScalarField> rAPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
@ -102,7 +102,7 @@ protected:
|
|||||||
void writeProps(const scalar gradP) const;
|
void writeProps(const scalar gradP) const;
|
||||||
|
|
||||||
//- Correct driving force for a constant mass flow rate
|
//- Correct driving force for a constant mass flow rate
|
||||||
void update(fvMatrix<vector>& eqn);
|
void update(fvMatrix<vector>& eqn) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -131,14 +131,14 @@ public:
|
|||||||
// Evaluate
|
// Evaluate
|
||||||
|
|
||||||
//- Correct the pressure gradient
|
//- Correct the pressure gradient
|
||||||
virtual void correct(volVectorField& U);
|
virtual void correct(volVectorField& U) const;
|
||||||
|
|
||||||
//- Add explicit contribution to momentum equation
|
//- Add explicit contribution to momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Add explicit contribution to compressible momentum equation
|
//- Add explicit contribution to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -146,14 +146,14 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Set 1/A coefficient
|
//- Set 1/A coefficient
|
||||||
virtual void constrain
|
virtual void constrain
|
||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -58,7 +58,7 @@ void Foam::fv::PhaseLimitStabilization<Type>::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const GeometricField<Type, fvPatchField, volMesh>& psi = eqn.psi();
|
const GeometricField<Type, fvPatchField, volMesh>& psi = eqn.psi();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2017-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -122,7 +122,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Read dictionary
|
//- Read dictionary
|
||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|||||||
@ -66,7 +66,7 @@ void Foam::fv::radialActuationDiskSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const scalarField& cellsV = mesh_.V();
|
const scalarField& cellsV = mesh_.V();
|
||||||
vectorField& Usource = eqn.source();
|
vectorField& Usource = eqn.source();
|
||||||
@ -91,7 +91,7 @@ void Foam::fv::radialActuationDiskSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const scalarField& cellsV = mesh_.V();
|
const scalarField& cellsV = mesh_.V();
|
||||||
vectorField& Usource = eqn.source();
|
vectorField& Usource = eqn.source();
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -143,7 +143,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to compressible momentum equation
|
//- Source term to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -151,7 +151,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -513,7 +513,7 @@ void Foam::fv::rotorDiskSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
volVectorField force
|
volVectorField force
|
||||||
(
|
(
|
||||||
@ -554,7 +554,7 @@ void Foam::fv::rotorDiskSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
volVectorField force
|
volVectorField force
|
||||||
(
|
(
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -158,7 +158,7 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Reference density for incompressible case
|
//- Reference density for incompressible case
|
||||||
scalar rhoRef_;
|
mutable scalar rhoRef_;
|
||||||
|
|
||||||
//- Rotational speed [rad/s]
|
//- Rotational speed [rad/s]
|
||||||
// Positive anti-clockwise when looking along -ve lift direction
|
// Positive anti-clockwise when looking along -ve lift direction
|
||||||
@ -303,7 +303,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to compressible momentum equation
|
//- Source term to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -311,7 +311,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -90,7 +90,7 @@ void Foam::fixedTrim::correct
|
|||||||
(
|
(
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
)
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -98,7 +98,8 @@ void Foam::fixedTrim::correct
|
|||||||
(
|
(
|
||||||
const volScalarField rho,
|
const volScalarField rho,
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force)
|
vectorField& force
|
||||||
|
) const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -84,7 +84,7 @@ public:
|
|||||||
(
|
(
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Correct the model for compressible flow
|
//- Correct the model for compressible flow
|
||||||
virtual void correct
|
virtual void correct
|
||||||
@ -92,7 +92,7 @@ public:
|
|||||||
const volScalarField rho,
|
const volScalarField rho,
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
);
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -101,7 +101,7 @@ void Foam::targetCoeffTrim::correctTrim
|
|||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (rotor_.mesh().time().timeIndex() % calcFrequency_ == 0)
|
if (rotor_.mesh().time().timeIndex() % calcFrequency_ == 0)
|
||||||
{
|
{
|
||||||
@ -276,7 +276,7 @@ void Foam::targetCoeffTrim::correct
|
|||||||
(
|
(
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
correctTrim(geometricOneField(), U, force);
|
correctTrim(geometricOneField(), U, force);
|
||||||
}
|
}
|
||||||
@ -287,7 +287,7 @@ void Foam::targetCoeffTrim::correct
|
|||||||
const volScalarField rho,
|
const volScalarField rho,
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
correctTrim(rho, U, force);
|
correctTrim(rho, U, force);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,7 +104,7 @@ protected:
|
|||||||
vector target_;
|
vector target_;
|
||||||
|
|
||||||
//- Pitch angles (collective, roll, pitch) [rad]
|
//- Pitch angles (collective, roll, pitch) [rad]
|
||||||
vector theta_;
|
mutable vector theta_;
|
||||||
|
|
||||||
//- Maximum number of iterations in trim routine
|
//- Maximum number of iterations in trim routine
|
||||||
label nIter_;
|
label nIter_;
|
||||||
@ -141,7 +141,7 @@ protected:
|
|||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -169,7 +169,7 @@ public:
|
|||||||
(
|
(
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Correct the model for compressible flow
|
//- Correct the model for compressible flow
|
||||||
virtual void correct
|
virtual void correct
|
||||||
@ -177,7 +177,7 @@ public:
|
|||||||
const volScalarField rho,
|
const volScalarField rho,
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
);
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
(
|
(
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
) = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Correct the model for compressible flow
|
//- Correct the model for compressible flow
|
||||||
virtual void correct
|
virtual void correct
|
||||||
@ -132,7 +132,7 @@ public:
|
|||||||
const volScalarField rho,
|
const volScalarField rho,
|
||||||
const vectorField& U,
|
const vectorField& U,
|
||||||
vectorField& force
|
vectorField& force
|
||||||
) = 0;
|
) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -123,7 +123,7 @@ void Foam::fv::solidEquilibriumEnergySource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const volScalarField alphahe(thermo().alphahe());
|
const volScalarField alphahe(thermo().alphahe());
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ void Foam::fv::solidEquilibriumEnergySource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const volScalarField alphahe(alpha*thermo().alphahe());
|
const volScalarField alphahe(alpha*thermo().alphahe());
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -125,7 +125,7 @@ public:
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<scalar>&,
|
fvMatrix<scalar>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Explicit and implicit sources for phase equations
|
//- Explicit and implicit sources for phase equations
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -134,7 +134,7 @@ public:
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<scalar>&,
|
fvMatrix<scalar>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -131,7 +131,10 @@ Foam::vector Foam::fv::solidificationMeltingSource::g() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::solidificationMeltingSource::update(const volScalarField& Cp)
|
void Foam::fv::solidificationMeltingSource::update
|
||||||
|
(
|
||||||
|
const volScalarField& Cp
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
if (curTimeIndex_ == mesh_.time().timeIndex())
|
if (curTimeIndex_ == mesh_.time().timeIndex())
|
||||||
{
|
{
|
||||||
@ -264,7 +267,7 @@ void Foam::fv::solidificationMeltingSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
apply(geometricOneField(), eqn);
|
apply(geometricOneField(), eqn);
|
||||||
}
|
}
|
||||||
@ -275,7 +278,7 @@ void Foam::fv::solidificationMeltingSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
apply(rho, eqn);
|
apply(rho, eqn);
|
||||||
}
|
}
|
||||||
@ -285,7 +288,7 @@ void Foam::fv::solidificationMeltingSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -325,7 +328,7 @@ void Foam::fv::solidificationMeltingSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
// Momentum source uses a Boussinesq approximation - redirect
|
// Momentum source uses a Boussinesq approximation - redirect
|
||||||
addSup(eqn, fieldi);
|
addSup(eqn, fieldi);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -203,13 +203,13 @@ private:
|
|||||||
scalar beta_;
|
scalar beta_;
|
||||||
|
|
||||||
//- Phase fraction indicator field
|
//- Phase fraction indicator field
|
||||||
volScalarField alpha1_;
|
mutable volScalarField alpha1_;
|
||||||
|
|
||||||
//- Current time index (used for updating)
|
//- Current time index (used for updating)
|
||||||
label curTimeIndex_;
|
mutable label curTimeIndex_;
|
||||||
|
|
||||||
//- Temperature change cached for source calculation when alpha1 updated
|
//- Temperature change cached for source calculation when alpha1 updated
|
||||||
scalarField deltaT_;
|
mutable scalarField deltaT_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -221,11 +221,11 @@ private:
|
|||||||
vector g() const;
|
vector g() const;
|
||||||
|
|
||||||
//- Update the model
|
//- Update the model
|
||||||
void update(const volScalarField& Cp);
|
void update(const volScalarField& Cp) const;
|
||||||
|
|
||||||
//- Helper function to apply to the energy equation
|
//- Helper function to apply to the energy equation
|
||||||
template<class RhoFieldType>
|
template<class RhoFieldType>
|
||||||
void apply(const RhoFieldType& rho, fvMatrix<scalar>& eqn);
|
void apply(const RhoFieldType& rho, fvMatrix<scalar>& eqn) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -257,10 +257,18 @@ public:
|
|||||||
// Add explicit and implicit contributions
|
// Add explicit and implicit contributions
|
||||||
|
|
||||||
//- Add explicit contribution to enthalpy equation
|
//- Add explicit contribution to enthalpy equation
|
||||||
virtual void addSup(fvMatrix<scalar>& eqn, const label fieldi);
|
virtual void addSup
|
||||||
|
(
|
||||||
|
fvMatrix<scalar>& eqn,
|
||||||
|
const label fieldi
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Add implicit contribution to momentum equation
|
//- Add implicit contribution to momentum equation
|
||||||
virtual void addSup(fvMatrix<vector>& eqn, const label fieldi);
|
virtual void addSup
|
||||||
|
(
|
||||||
|
fvMatrix<vector>& eqn,
|
||||||
|
const label fieldi
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Add explicit and implicit contributions to compressible equation
|
// Add explicit and implicit contributions to compressible equation
|
||||||
@ -271,7 +279,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Add implicit contribution to compressible momentum equation
|
//- Add implicit contribution to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -279,7 +287,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2014-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2014-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -33,7 +33,7 @@ void Foam::fv::solidificationMeltingSource::apply
|
|||||||
(
|
(
|
||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
fvMatrix<scalar>& eqn
|
fvMatrix<scalar>& eqn
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -77,7 +77,7 @@ void Foam::fv::tabulatedAccelerationSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSup<geometricOneField>(geometricOneField(), eqn, fieldi);
|
addSup<geometricOneField>(geometricOneField(), eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@ void Foam::fv::tabulatedAccelerationSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSup<volScalarField>(rho, eqn, fieldi);
|
addSup<volScalarField>(rho, eqn, fieldi);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -79,6 +79,7 @@ protected:
|
|||||||
|
|
||||||
dimensionedVector g0_;
|
dimensionedVector g0_;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
@ -90,7 +91,7 @@ private:
|
|||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -129,7 +130,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to compressible momentum equation
|
//- Source term to compressible momentum equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -137,7 +138,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Read dictionary
|
//- Read dictionary
|
||||||
virtual bool read(const dictionary& dict);
|
virtual bool read(const dictionary& dict);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -36,7 +36,7 @@ void Foam::fv::tabulatedAccelerationSource::addSup
|
|||||||
const RhoFieldType& rho,
|
const RhoFieldType& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
Vector<vector> acceleration(motion_.acceleration());
|
Vector<vector> acceleration(motion_.acceleration());
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ void Foam::fv::volumeFractionSource::addDivSup
|
|||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const surfaceScalarField& phi =
|
const surfaceScalarField& phi =
|
||||||
mesh().lookupObject<surfaceScalarField>(phiName_);
|
mesh().lookupObject<surfaceScalarField>(phiName_);
|
||||||
@ -140,7 +140,7 @@ void Foam::fv::volumeFractionSource::addUDivSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const surfaceScalarField& phi =
|
const surfaceScalarField& phi =
|
||||||
mesh().lookupObject<surfaceScalarField>(phiName_);
|
mesh().lookupObject<surfaceScalarField>(phiName_);
|
||||||
@ -157,7 +157,7 @@ void Foam::fv::volumeFractionSource::addRhoDivSup
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const surfaceScalarField& phi =
|
const surfaceScalarField& phi =
|
||||||
mesh().lookupObject<surfaceScalarField>(phiName_);
|
mesh().lookupObject<surfaceScalarField>(phiName_);
|
||||||
@ -174,7 +174,7 @@ void Foam::fv::volumeFractionSource::addLaplacianSup
|
|||||||
const AlphaFieldType& alpha,
|
const AlphaFieldType& alpha,
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
const volScalarField B(1 - this->alpha());
|
const volScalarField B(1 - this->alpha());
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (fieldNames_[fieldi] == rhoName_)
|
if (fieldNames_[fieldi] == rhoName_)
|
||||||
{
|
{
|
||||||
@ -238,7 +238,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (fieldNames_[fieldi] == UName_)
|
if (fieldNames_[fieldi] == UName_)
|
||||||
{
|
{
|
||||||
@ -256,7 +256,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
||||||
@ -267,7 +267,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
||||||
@ -278,7 +278,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
||||||
@ -290,7 +290,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (fieldNames_[fieldi] == rhoName_)
|
if (fieldNames_[fieldi] == rhoName_)
|
||||||
{
|
{
|
||||||
@ -309,7 +309,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (fieldNames_[fieldi] == UName_)
|
if (fieldNames_[fieldi] == UName_)
|
||||||
{
|
{
|
||||||
@ -328,7 +328,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
||||||
@ -340,7 +340,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
||||||
@ -352,7 +352,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
addLaplacianSup(geometricOneField(), eqn, fieldi);
|
||||||
@ -365,7 +365,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (fieldNames_[fieldi] == rhoName_)
|
if (fieldNames_[fieldi] == rhoName_)
|
||||||
{
|
{
|
||||||
@ -385,7 +385,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (fieldNames_[fieldi] == UName_)
|
if (fieldNames_[fieldi] == UName_)
|
||||||
{
|
{
|
||||||
@ -405,7 +405,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(alpha, eqn, fieldi);
|
addLaplacianSup(alpha, eqn, fieldi);
|
||||||
@ -418,7 +418,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(alpha, eqn, fieldi);
|
addLaplacianSup(alpha, eqn, fieldi);
|
||||||
@ -431,7 +431,7 @@ void Foam::fv::volumeFractionSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addDivSup(eqn, fieldi);
|
addDivSup(eqn, fieldi);
|
||||||
addLaplacianSup(alpha, eqn, fieldi);
|
addLaplacianSup(alpha, eqn, fieldi);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -115,11 +115,16 @@ class volumeFractionSource
|
|||||||
|
|
||||||
//- Add time-derivative terms to an equation
|
//- Add time-derivative terms to an equation
|
||||||
template <class Type>
|
template <class Type>
|
||||||
void addDdtSup(fvMatrix<Type>&, const label);
|
void addDdtSup(fvMatrix<Type>&, const label) const;
|
||||||
|
|
||||||
//- Add time-derivative terms to a compressible equation
|
//- Add time-derivative terms to a compressible equation
|
||||||
template <class Type>
|
template <class Type>
|
||||||
void addDdtSup(const volScalarField&, fvMatrix<Type>&, const label);
|
void addDdtSup
|
||||||
|
(
|
||||||
|
const volScalarField&,
|
||||||
|
fvMatrix<Type>&,
|
||||||
|
const label
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Add time-derivative terms to a phase-compressible equation
|
//- Add time-derivative terms to a phase-compressible equation
|
||||||
template <class Type>
|
template <class Type>
|
||||||
@ -129,17 +134,17 @@ class volumeFractionSource
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<Type>&,
|
fvMatrix<Type>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Add divergence terms to an equation
|
//- Add divergence terms to an equation
|
||||||
template <class Type>
|
template <class Type>
|
||||||
void addDivSup(fvMatrix<Type>&, const label);
|
void addDivSup(fvMatrix<Type>&, const label) const;
|
||||||
|
|
||||||
//- Add divergence terms to the momentum equation
|
//- Add divergence terms to the momentum equation
|
||||||
void addUDivSup(fvMatrix<vector>&, const label);
|
void addUDivSup(fvMatrix<vector>&, const label) const;
|
||||||
|
|
||||||
//- Add divergence terms to the continuity equation
|
//- Add divergence terms to the continuity equation
|
||||||
void addRhoDivSup(fvMatrix<scalar>&, const label);
|
void addRhoDivSup(fvMatrix<scalar>&, const label) const;
|
||||||
|
|
||||||
//- Add Laplacian terms to an equation
|
//- Add Laplacian terms to an equation
|
||||||
template <class Type, class AlphaFieldType>
|
template <class Type, class AlphaFieldType>
|
||||||
@ -148,7 +153,7 @@ class volumeFractionSource
|
|||||||
const AlphaFieldType& alpha,
|
const AlphaFieldType& alpha,
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -182,15 +187,19 @@ public:
|
|||||||
|
|
||||||
// Explicit and implicit sources
|
// Explicit and implicit sources
|
||||||
|
|
||||||
virtual void addSup(fvMatrix<scalar>&, const label);
|
virtual void addSup(fvMatrix<scalar>&, const label) const;
|
||||||
|
|
||||||
virtual void addSup(fvMatrix<vector>&, const label);
|
virtual void addSup(fvMatrix<vector>&, const label) const;
|
||||||
|
|
||||||
virtual void addSup(fvMatrix<symmTensor>&, const label);
|
virtual void addSup(fvMatrix<symmTensor>&, const label) const;
|
||||||
|
|
||||||
virtual void addSup(fvMatrix<sphericalTensor>&, const label);
|
virtual void addSup
|
||||||
|
(
|
||||||
|
fvMatrix<sphericalTensor>&,
|
||||||
|
const label
|
||||||
|
) const;
|
||||||
|
|
||||||
virtual void addSup(fvMatrix<tensor>&, const label);
|
virtual void addSup(fvMatrix<tensor>&, const label) const;
|
||||||
|
|
||||||
|
|
||||||
// Explicit and implicit sources for compressible equations
|
// Explicit and implicit sources for compressible equations
|
||||||
@ -200,35 +209,35 @@ public:
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<scalar>&,
|
fvMatrix<scalar>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<vector>&,
|
fvMatrix<vector>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<symmTensor>&,
|
fvMatrix<symmTensor>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<sphericalTensor>&,
|
fvMatrix<sphericalTensor>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<tensor>&,
|
fvMatrix<tensor>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Explicit and implicit sources for phase equations
|
// Explicit and implicit sources for phase equations
|
||||||
@ -239,7 +248,7 @@ public:
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<scalar>&,
|
fvMatrix<scalar>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -247,7 +256,7 @@ public:
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<vector>&,
|
fvMatrix<vector>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -255,7 +264,7 @@ public:
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<symmTensor>&,
|
fvMatrix<symmTensor>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -263,7 +272,7 @@ public:
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<sphericalTensor>&,
|
fvMatrix<sphericalTensor>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -271,7 +280,7 @@ public:
|
|||||||
const volScalarField&,
|
const volScalarField&,
|
||||||
fvMatrix<tensor>&,
|
fvMatrix<tensor>&,
|
||||||
const label
|
const label
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -158,7 +158,7 @@ template<class Type>
|
|||||||
void Foam::fv::CodedSource<Type>::correct
|
void Foam::fv::CodedSource<Type>::correct
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>& field
|
GeometricField<Type, fvPatchField, volMesh>& field
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -176,7 +176,7 @@ void Foam::fv::CodedSource<Type>::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -195,7 +195,7 @@ void Foam::fv::CodedSource<Type>::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -213,7 +213,7 @@ void Foam::fv::CodedSource<Type>::constrain
|
|||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -191,20 +191,21 @@ public:
|
|||||||
//- Dynamically compiled fvOption
|
//- Dynamically compiled fvOption
|
||||||
option& redirectFvOption() const;
|
option& redirectFvOption() const;
|
||||||
|
|
||||||
|
|
||||||
// Evaluation
|
// Evaluation
|
||||||
|
|
||||||
//- Correct field
|
//- Correct field
|
||||||
virtual void correct
|
virtual void correct
|
||||||
(
|
(
|
||||||
GeometricField<Type, fvPatchField, volMesh>&
|
GeometricField<Type, fvPatchField, volMesh>&
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Explicit and implicit matrix contributions
|
//- Explicit and implicit matrix contributions
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Explicit and implicit matrix contributions
|
//- Explicit and implicit matrix contributions
|
||||||
// to compressible equation
|
// to compressible equation
|
||||||
@ -213,14 +214,14 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Set value
|
//- Set value
|
||||||
virtual void constrain
|
virtual void constrain
|
||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -64,7 +64,7 @@ void Foam::fv::semiImplicitSource::addSupType
|
|||||||
(
|
(
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ void Foam::fv::semiImplicitSource::addSupType
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<Type>& eqn,
|
fvMatrix<Type>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
@ -174,7 +174,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -184,7 +184,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -194,7 +194,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -214,7 +214,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -225,7 +225,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -236,7 +236,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -269,7 +269,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -293,7 +293,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -317,7 +317,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -329,7 +329,7 @@ void Foam::fv::semiImplicitSource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSupType(eqn, fieldi);
|
addSupType(eqn, fieldi);
|
||||||
}
|
}
|
||||||
@ -393,4 +393,5 @@ bool Foam::fv::semiImplicitSource::read(const dictionary& dict)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -147,11 +147,16 @@ private:
|
|||||||
|
|
||||||
//- Add divergence terms to an equation
|
//- Add divergence terms to an equation
|
||||||
template <class Type>
|
template <class Type>
|
||||||
void addSupType(fvMatrix<Type>&, const label);
|
void addSupType(fvMatrix<Type>&, const label) const;
|
||||||
|
|
||||||
//- Add divergence terms to an equation
|
//- Add divergence terms to an equation
|
||||||
template <class Type>
|
template <class Type>
|
||||||
void addSupType(const volScalarField&, fvMatrix<Type>&, const label);
|
void addSupType
|
||||||
|
(
|
||||||
|
const volScalarField&,
|
||||||
|
fvMatrix<Type>&,
|
||||||
|
const label
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -185,31 +190,31 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Explicit and implicit sources for compressible equations
|
// Explicit and implicit sources for compressible equations
|
||||||
@ -219,35 +224,35 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Explicit and implicit sources for phase equations
|
// Explicit and implicit sources for phase equations
|
||||||
@ -258,7 +263,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -266,7 +271,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -274,7 +279,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<symmTensor>& eqn,
|
fvMatrix<symmTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -282,7 +287,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<sphericalTensor>& eqn,
|
fvMatrix<sphericalTensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
(
|
(
|
||||||
@ -290,7 +295,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<tensor>& eqn,
|
fvMatrix<tensor>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -47,7 +47,7 @@ namespace fv
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::fv::interRegionExplicitPorositySource::initialise()
|
void Foam::fv::interRegionExplicitPorositySource::initialise() const
|
||||||
{
|
{
|
||||||
if (!firstIter_)
|
if (!firstIter_)
|
||||||
{
|
{
|
||||||
@ -135,7 +135,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
initialise();
|
initialise();
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
initialise();
|
initialise();
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -85,10 +85,10 @@ protected:
|
|||||||
// Protected data
|
// Protected data
|
||||||
|
|
||||||
//- Run-time selectable porosity model
|
//- Run-time selectable porosity model
|
||||||
autoPtr<porosityModel> porosityPtr_;
|
mutable autoPtr<porosityModel> porosityPtr_;
|
||||||
|
|
||||||
//- First iteration
|
//- First iteration
|
||||||
bool firstIter_;
|
mutable bool firstIter_;
|
||||||
|
|
||||||
//- Velocity field name, default = U
|
//- Velocity field name, default = U
|
||||||
word UName_;
|
word UName_;
|
||||||
@ -101,7 +101,7 @@ protected:
|
|||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
//- Initialise
|
//- Initialise
|
||||||
void initialise();
|
void initialise() const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -142,7 +142,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// Add explicit and implicit contributions to compressible equation
|
// Add explicit and implicit contributions to compressible equation
|
||||||
@ -153,7 +153,7 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<vector>& eqn,
|
fvMatrix<vector>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,7 +104,7 @@ Foam::fv::constantHeatTransfer::~constantHeatTransfer()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::fv::constantHeatTransfer::calculateHtc()
|
void Foam::fv::constantHeatTransfer::calculateHtc() const
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -85,7 +85,7 @@ public:
|
|||||||
// Public Functions
|
// Public Functions
|
||||||
|
|
||||||
//- Calculate the heat transfer coefficient
|
//- Calculate the heat transfer coefficient
|
||||||
virtual void calculateHtc();
|
virtual void calculateHtc() const;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -43,7 +43,7 @@ namespace fv
|
|||||||
|
|
||||||
// * * * * * * * * * * * * Protected member functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * Protected member functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::fv::interRegionHeatTransferModel::setNbrModel()
|
void Foam::fv::interRegionHeatTransferModel::setNbrModel() const
|
||||||
{
|
{
|
||||||
if (!firstIter_)
|
if (!firstIter_)
|
||||||
{
|
{
|
||||||
@ -84,7 +84,7 @@ void Foam::fv::interRegionHeatTransferModel::setNbrModel()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::fv::interRegionHeatTransferModel::correct()
|
void Foam::fv::interRegionHeatTransferModel::correct() const
|
||||||
{
|
{
|
||||||
if (master_)
|
if (master_)
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ void Foam::fv::interRegionHeatTransferModel::addSup
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
setNbrModel();
|
setNbrModel();
|
||||||
|
|
||||||
@ -254,7 +254,7 @@ void Foam::fv::interRegionHeatTransferModel::addSup
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
)
|
) const
|
||||||
{
|
{
|
||||||
addSup(eqn, fieldi);
|
addSup(eqn, fieldi);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -64,16 +64,16 @@ protected:
|
|||||||
word nbrModelName_;
|
word nbrModelName_;
|
||||||
|
|
||||||
//- Pointer to neighbour interRegionHeatTransferModel
|
//- Pointer to neighbour interRegionHeatTransferModel
|
||||||
interRegionHeatTransferModel* nbrModel_;
|
mutable interRegionHeatTransferModel* nbrModel_;
|
||||||
|
|
||||||
//- First iteration
|
//- First iteration
|
||||||
bool firstIter_;
|
mutable bool firstIter_;
|
||||||
|
|
||||||
//- Time index - used for updating htc
|
//- Time index - used for updating htc
|
||||||
label timeIndex_;
|
mutable label timeIndex_;
|
||||||
|
|
||||||
//- Heat transfer coefficient [W/m^2/k] times area/volume [1/m]
|
//- Heat transfer coefficient [W/m^2/k] times area/volume [1/m]
|
||||||
volScalarField htc_;
|
mutable volScalarField htc_;
|
||||||
|
|
||||||
//- Flag to activate semi-implicit coupling
|
//- Flag to activate semi-implicit coupling
|
||||||
bool semiImplicit_;
|
bool semiImplicit_;
|
||||||
@ -88,13 +88,13 @@ protected:
|
|||||||
// Protected member functions
|
// Protected member functions
|
||||||
|
|
||||||
//- Set the neighbour interRegionHeatTransferModel
|
//- Set the neighbour interRegionHeatTransferModel
|
||||||
void setNbrModel();
|
void setNbrModel() const;
|
||||||
|
|
||||||
//- Inherit correct from interRegionOption
|
//- Inherit correct from interRegionOption
|
||||||
using interRegionOption::correct;
|
using interRegionOption::correct;
|
||||||
|
|
||||||
//- Correct to calculate the inter-region heat transfer coefficient
|
//- Correct to calculate the inter-region heat transfer coefficient
|
||||||
void correct();
|
void correct() const;
|
||||||
|
|
||||||
//- Interpolate field with nbrModel specified
|
//- Interpolate field with nbrModel specified
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -175,7 +175,7 @@ public:
|
|||||||
(
|
(
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Source term to compressible energy equation
|
//- Source term to compressible energy equation
|
||||||
virtual void addSup
|
virtual void addSup
|
||||||
@ -183,10 +183,10 @@ public:
|
|||||||
const volScalarField& rho,
|
const volScalarField& rho,
|
||||||
fvMatrix<scalar>& eqn,
|
fvMatrix<scalar>& eqn,
|
||||||
const label fieldi
|
const label fieldi
|
||||||
);
|
) const;
|
||||||
|
|
||||||
//- Calculate heat transfer coefficient
|
//- Calculate heat transfer coefficient
|
||||||
virtual void calculateHtc() = 0;
|
virtual void calculateHtc() const = 0;
|
||||||
|
|
||||||
|
|
||||||
// IO
|
// IO
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace fv
|
|||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::interpolation2DTable<Foam::scalar>&
|
const Foam::interpolation2DTable<Foam::scalar>&
|
||||||
Foam::fv::tabulatedHeatTransfer::hTable()
|
Foam::fv::tabulatedHeatTransfer::hTable() const
|
||||||
{
|
{
|
||||||
if (!hTable_.valid())
|
if (!hTable_.valid())
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ Foam::fv::tabulatedHeatTransfer::hTable()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::fv::tabulatedHeatTransfer::AoV()
|
const Foam::volScalarField& Foam::fv::tabulatedHeatTransfer::AoV() const
|
||||||
{
|
{
|
||||||
if (!AoV_.valid())
|
if (!AoV_.valid())
|
||||||
{
|
{
|
||||||
@ -109,7 +109,7 @@ Foam::fv::tabulatedHeatTransfer::~tabulatedHeatTransfer()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::fv::tabulatedHeatTransfer::calculateHtc()
|
void Foam::fv::tabulatedHeatTransfer::calculateHtc() const
|
||||||
{
|
{
|
||||||
const fvMesh& nbrMesh = mesh_.time().lookupObject<fvMesh>(nbrRegionName());
|
const fvMesh& nbrMesh = mesh_.time().lookupObject<fvMesh>(nbrRegionName());
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user