Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions applications/solvers/dfHighSpeedFoam/createFields.H
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ autoPtr<compressible::turbulenceModel> turbulence
thermo
)
);
const word turbName(mesh.objectRegistry::lookupObject<IOdictionary>("turbulenceProperties").lookup("simulationType"));

multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;

Expand Down
38 changes: 30 additions & 8 deletions applications/solvers/dfHighSpeedFoam/rhoEEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,21 @@ if (!inviscid)
{
if((ddtSchemes == "RK2SSP") || (ddtSchemes == "RK3SSP"))
{
rhoE_rhs = fvc::laplacian(turbulence->alphaEff()*thermo.gamma(), ea)
rhoE_rhs =
(
turbName == "laminar"
?
(
fvc::laplacian(turbulence->alphaEff()*thermo.gamma(), ea)
- diffAlphaD
+ fvc::div(hDiffCorrFlux);
+ fvc::div(hDiffCorrFlux)
)
:
(
fvc::laplacian(turbulence->alphaEff()*thermo.gamma(), ea)
)
);


rhoE += rkcoe3[nrk]*rhoE_rhs*runTime.deltaT();

Expand All @@ -54,12 +66,22 @@ if (!inviscid)
{
fvScalarMatrix eEqn
(
fvm::ddt(rho, ea) - fvc::ddt(rho, ea)
// alpha in deepflame is considered to calculate h by default (kappa/Cp), so multiply gamma to correct alpha
- fvm::laplacian(turbulence->alphaEff()*thermo.gamma(), ea)
+ diffAlphaD
==
fvc::div(hDiffCorrFlux)
fvm::ddt(rho, ea) - fvc::ddt(rho, ea)
==
(
turbName == "laminar"
?
(
// alpha in deepflame is considered to calculate h by default (kappa/Cp), so multiply gamma to correct alpha
fvm::laplacian(turbulence->alphaEff()*thermo.gamma(), ea)
- diffAlphaD
+ fvc::div(hDiffCorrFlux)
)
:
(
fvm::laplacian(turbulence->alphaEff()*thermo.gamma(), ea)
)
)
);

eEqn.solve("ea");
Expand Down
17 changes: 13 additions & 4 deletions applications/solvers/dfHighSpeedFoam/rhoYEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ time_monitor_corrDiff += double(end - start) / double(CLOCKS_PER_SEC);

if((ddtSchemes == "RK2SSP") || (ddtSchemes == "RK3SSP"))
{
rhoYi_rhs = fvc::laplacian(DEff(), Yi) - fvc::div(phiUc,Yi,"div(phic,Yi)");
rhoYi_rhs =
(
turbName == "laminar"
? (fvc::laplacian(DEff(), Yi) - fvc::div(phiUc,Yi,"div(phic,Yi)"))
: fvc::laplacian(DEff(), Yi)
);

rhoYi[i] += rkcoe3[nrk]*rhoYi_rhs*runTime.deltaT();

Expand All @@ -121,9 +126,13 @@ time_monitor_corrDiff += double(end - start) / double(CLOCKS_PER_SEC);

fvScalarMatrix YiEqn
(
fvm::ddt(rho, Yi) - fvc::ddt(rho, Yi)
- fvm::laplacian(DEff(), Yi)
+ mvConvection->fvmDiv(phiUc, Yi)
fvm::ddt(rho, Yi) - fvc::ddt(rho, Yi)
-
(
turbName == "laminar"
? (fvm::laplacian(DEff(), Yi) + mvConvection->fvmDiv(phiUc, Yi))
: fvm::laplacian(DEff(), Yi)
)
);

YiEqn.relax();
Expand Down