Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
[s/] Make huge update of multiCompression solver
Browse files Browse the repository at this point in the history
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
staneuski committed Jul 8, 2019
1 parent 2bdeb7e commit dbe7c0a
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 316 deletions.
18 changes: 0 additions & 18 deletions solvers/multiCompression/boolOptions.H

This file was deleted.

9 changes: 0 additions & 9 deletions solvers/multiCompression/createControls.H

This file was deleted.

185 changes: 78 additions & 107 deletions solvers/multiCompression/createFields.H
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"
Loading

0 comments on commit dbe7c0a

Please sign in to comment.