Skip to content

Commit b4cf404

Browse files
author
Henry Weller
committed
ThermophysicalTransportModels: Added j and divj functions for specie mass-fraction transport
Provides an abstraction of specie transport to support run-times selectable and extensible multi-component thermal and specie laminar and turbulent transport.
1 parent 3d3f61a commit b4cf404

File tree

17 files changed

+122
-33
lines changed

17 files changed

+122
-33
lines changed

applications/solvers/combustion/fireFoam/YEEqn.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
2323
(
2424
fvm::ddt(rho, Yi)
2525
+ mvConvection->fvmDiv(phi, Yi)
26-
- fvm::laplacian(thermophysicalTransport->alphaEff(), Yi)
26+
+ thermophysicalTransport->divj(Yi)
2727
==
2828
parcels.SYi(i, Yi)
2929
+ surfaceFilm.Srho(i)
@@ -63,7 +63,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
6363
)
6464
: -dpdt
6565
)
66-
- fvm::laplacian(thermophysicalTransport->alphaEff(), he)
66+
+ thermophysicalTransport->divq(he)
6767
==
6868
combustion->Qdot()
6969
+ radiation->Sh(thermo, he)

applications/solvers/combustion/reactingFoam/YEqn.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
2323
(
2424
fvm::ddt(rho, Yi)
2525
+ mvConvection->fvmDiv(phi, Yi)
26-
- fvm::laplacian(thermophysicalTransport->alphaEff(), Yi)
26+
+ thermophysicalTransport->divj(Yi)
2727
==
2828
reaction->R(Yi)
2929
+ fvOptions(rho, Yi)

applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/YEqn.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ if (Y.size())
4242
(
4343
fvm::ddt(rho, Yi)
4444
+ mvConvection->fvmDiv(phi, Yi)
45-
- fvm::laplacian(thermophysicalTransport.alphaEff(), Yi)
45+
+ thermophysicalTransport.divj(Yi)
4646
==
4747
reaction.R(Yi)
4848
+ fvOptions(rho, Yi)

applications/solvers/lagrangian/coalChemistryFoam/YEqn.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
2424
(
2525
fvm::ddt(rho, Yi)
2626
+ mvConvection->fvmDiv(phi, Yi)
27-
- fvm::laplacian(thermophysicalTransport->alphaEff(), Yi)
27+
+ thermophysicalTransport->divj(Yi)
2828
==
2929
coalParcels.SYi(i, Yi)
3030
+ combustion->R(Yi)

applications/solvers/lagrangian/reactingParcelFoam/YEqn.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
2424
(
2525
fvm::ddt(rho, Yi)
2626
+ mvConvection->fvmDiv(phi, Yi)
27-
- fvm::laplacian(thermophysicalTransport->alphaEff(), Yi)
27+
+ thermophysicalTransport->divj(Yi)
2828
==
2929
parcels.SYi(i, Yi)
3030
+ fvOptions(rho, Yi)

applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/YEqn.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
2222
fvScalarMatrix YEqn
2323
(
2424
mvConvection->fvmDiv(phi, Yi)
25-
- fvm::laplacian(thermophysicalTransport->alphaEff(), Yi)
25+
+ thermophysicalTransport->divj(Yi)
2626
==
2727
parcels.SYi(i, Yi)
2828
+ combustion->R(Yi)

applications/solvers/lagrangian/sprayFoam/YEqn.H

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tmp<fv::convectionScheme<scalar>> mvConvection
2323
(
2424
fvm::ddt(rho, Yi)
2525
+ mvConvection->fvmDiv(phi, Yi)
26-
- fvm::laplacian(thermophysicalTransport->alphaEff(), Yi)
26+
+ thermophysicalTransport->divj(Yi)
2727
==
2828
parcels.SYi(i, Yi)
2929
+ combustion->R(Yi)

src/ThermophysicalTransportModels/LES/LESThermophysicalTransportModel/LESThermophysicalTransportModel.H

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,6 @@ public:
200200
return this->thermo().alphahe(patchi);
201201
}
202202

203-
//- Return the heat flux
204-
virtual tmp<volVectorField> q() const = 0;
205-
206-
//- Return the source term for the energy equation
207-
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const = 0;
208-
209203
//- Correct the LES transport
210204
virtual void correct();
211205

src/ThermophysicalTransportModels/LES/LESeddyDiffusivity/LESeddyDiffusivity.C

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ tmp<volVectorField>eddyDiffusivity<BasicThermophysicalTransportModel>::q() const
122122
"q",
123123
this->momentumTransport().alphaRhoPhi().group()
124124
),
125-
-this->alphaEff()
125+
-this->alpha()*this->alphaEff()
126126
*fvc::grad(this->thermo().he())
127127
);
128128
}
@@ -135,7 +135,36 @@ eddyDiffusivity<BasicThermophysicalTransportModel>::divq
135135
volScalarField& he
136136
) const
137137
{
138-
return -fvm::laplacian(this->alphaEff(), he);
138+
return -fvm::laplacian(this->alpha()*this->alphaEff(), he);
139+
}
140+
141+
142+
template<class BasicThermophysicalTransportModel>
143+
tmp<volVectorField>eddyDiffusivity<BasicThermophysicalTransportModel>::j
144+
(
145+
const volScalarField& Yi
146+
) const
147+
{
148+
return volVectorField::New
149+
(
150+
IOobject::groupName
151+
(
152+
"j(" + Yi.name() + ')',
153+
this->momentumTransport().alphaRhoPhi().group()
154+
),
155+
-this->alpha()*this->alphaEff()*fvc::grad(Yi)
156+
);
157+
}
158+
159+
160+
template<class BasicThermophysicalTransportModel>
161+
tmp<fvScalarMatrix>
162+
eddyDiffusivity<BasicThermophysicalTransportModel>::divj
163+
(
164+
volScalarField& Yi
165+
) const
166+
{
167+
return -fvm::laplacian(this->alpha()*this->alphaEff(), Yi);
139168
}
140169

141170

src/ThermophysicalTransportModels/LES/LESeddyDiffusivity/LESeddyDiffusivity.H

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ public:
157157
//- Return the source term for the energy equation
158158
virtual tmp<fvScalarMatrix> divq(volScalarField& he) const;
159159

160+
//- Return the specie flux for the given specie mass-fraction
161+
virtual tmp<volVectorField> j(const volScalarField& Yi) const;
162+
163+
//- Return the source term for the given specie mass-fraction equation
164+
virtual tmp<fvScalarMatrix> divj(volScalarField& Yi) const;
165+
160166
//- Correct the eddyDiffusivity viscosity
161167
virtual void correct();
162168
};

0 commit comments

Comments
 (0)