This repository has been archived by the owner on Feb 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[s/] Make huge update of multiCompression solver
Now it four solve equations: 1. dt(T) + ∇•T - DT∆T = T 2. dt(rho) + ∇•(phi*rho) = 0 3. Dt(rho*U) = - grad(p) + grad( μ/3*div(U) ) + ∆U 4. Dt(rho*e) = - ∇•(p*U) + ∇•(λgrad(T)) + U•[ μ*∆U + grad(μ/3*∇•U) ]
- Loading branch information
Showing
4 changed files
with
155 additions
and
316 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,152 +1,123 @@ | ||
Info<< "Reading velocity field U\n" << endl; | ||
volVectorField U | ||
( | ||
IOobject | ||
( | ||
"U", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::MUST_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
mesh | ||
); | ||
|
||
U = dimensionedVector("0", U.dimensions(), Zero); // ???? | ||
|
||
surfaceScalarField phi | ||
( | ||
IOobject | ||
( | ||
"phi", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::NO_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
fvc::flux(U) | ||
IOobject | ||
( | ||
"U", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::MUST_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
mesh | ||
); | ||
|
||
Info<< "Reading pressure field p" << nl << endl; | ||
Info<< "Reading pressure field p\n" << nl << endl; | ||
|
||
volScalarField p | ||
( | ||
IOobject | ||
( | ||
"p", | ||
IOobject | ||
( | ||
"p", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::MUST_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
mesh | ||
), | ||
mesh | ||
); | ||
|
||
Info<< "Reading pressure field rho" << nl << endl; | ||
Info<< "Reading pressure field rho\n" << nl << endl; | ||
|
||
volScalarField rho | ||
( | ||
IOobject | ||
( | ||
"rho", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::MUST_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
mesh | ||
IOobject | ||
( | ||
"rho", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::MUST_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
mesh | ||
); | ||
|
||
Info<< "Constructing specific energy field e" << nl << endl; | ||
Info<< "Reading temperure field T\n" << nl << endl; | ||
|
||
wordList eBCTypes | ||
volScalarField T | ||
( | ||
rho.boundaryField().size(), | ||
zeroGradientFvPatchScalarField::typeName | ||
IOobject | ||
( | ||
"T", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::MUST_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
mesh | ||
); | ||
|
||
forAll(rho.boundaryField(), patchi) | ||
{ | ||
if (rho.boundaryField()[patchi].fixesValue()) | ||
{ | ||
eBCTypes[patchi] = fixedValueFvPatchScalarField::typeName; | ||
} | ||
} | ||
|
||
volScalarField e | ||
surfaceScalarField phi | ||
( | ||
IOobject | ||
( | ||
"e", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::NO_READ, | ||
IOobject::AUTO_WRITE | ||
"phi", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::NO_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
p/(k - 1)*rho + sqr(phi)/2, | ||
eBCTypes | ||
fvc::flux(rho*U) // FIXME phi with density makes dimensions not equal almost in every Eqn | ||
); | ||
|
||
Info<< "Constructing mass field M" << nl << endl; | ||
Info<< "Reading thermophysical properties\n" << endl; | ||
|
||
wordList IntegralBCTypes | ||
IOdictionary thermophysicalProperties | ||
( | ||
rho.boundaryField().size(), | ||
zeroGradientFvPatchScalarField::typeName | ||
IOobject | ||
( | ||
"thermophysicalProperties", | ||
runTime.constant(), | ||
mesh, | ||
IOobject::MUST_READ_IF_MODIFIED, | ||
IOobject::NO_WRITE | ||
) | ||
); | ||
|
||
forAll(rho.boundaryField(), patchi) | ||
{ | ||
if (rho.boundaryField()[patchi].fixesValue()) | ||
{ | ||
IntegralBCTypes[patchi] = fixedValueFvPatchScalarField::typeName; | ||
} | ||
} | ||
Info<< "Reading diffusivity DT\n" << endl; | ||
|
||
volScalarField M | ||
dimensionedScalar DT | ||
( | ||
IOobject | ||
( | ||
"M", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::NO_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
rho*phi*deltaT*F, // deltaT*F - ? | ||
IntegralBCTypes | ||
thermophysicalProperties.lookup("DT") | ||
); | ||
|
||
Info<< "Constructing momentum field K" << nl << endl; | ||
Info<< "Reading dinamic viscosity\n" << endl; | ||
|
||
volScalarField K | ||
dimensionedScalar MU | ||
( | ||
IOobject | ||
( | ||
"K", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::NO_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
M*phi, | ||
IntegralBCTypes | ||
thermophysicalProperties.lookup("MU") | ||
); | ||
|
||
Info<< "Constructing energy field E" << nl << endl; | ||
Info<< "Reading DIFFDENSITY\n" << endl; | ||
|
||
volScalarField E | ||
dimensionedScalar DIFFDENSITY | ||
( | ||
IOobject | ||
( | ||
"E", | ||
runTime.timeName(), | ||
mesh, | ||
IOobject::NO_READ, | ||
IOobject::AUTO_WRITE | ||
), | ||
M*e, | ||
IntegralBCTypes | ||
thermophysicalProperties.lookup("DIFFDENSITY") | ||
); | ||
|
||
|
||
Info<< "Reading heat capacity ratio\n" << endl; | ||
|
||
dimensionedScalar GAMMA | ||
( | ||
thermophysicalProperties.lookup("GAMMA") | ||
); | ||
|
||
Info<< "Reading thermal conductivity\n" << endl; | ||
|
||
dimensionedScalar LAMBDA | ||
( | ||
thermophysicalProperties.lookup("LAMBDA") | ||
); | ||
|
||
#include "createFvOptions.H" | ||
#include "createFvOptions.H" |
Oops, something went wrong.