mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Renamed U_ and T_ to boundaryU_ and boundaryT_.
Moved all fields and field reading into the DsmcCloud, all calculation and resetting to single functions for all fields. Changed constructors so that no fields are supplied to the solver called from dsmcFoam and an initialisation dictionary is supplied by dsmcInitialise.
This commit is contained in:
@ -1,162 +0,0 @@
|
||||
|
||||
Info<< nl << "Reading field boundaryT" << endl;
|
||||
volScalarField boundaryT
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"boundaryT",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field boundaryU" << endl;
|
||||
volVectorField boundaryU
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"boundaryU",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field rhoN (number density)" << endl;
|
||||
volScalarField rhoN
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rhoN",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field rhoM (mass density)" << endl;
|
||||
volScalarField rhoM
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rhoM",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field rhoNdsmc (dsmc particle density)" << endl;
|
||||
volScalarField dsmcRhoN
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dsmcRhoN",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field momentum (momentum density)" << endl;
|
||||
volVectorField momentum
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"momentum",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field linearKE (linear kinetic energy density)"
|
||||
<< endl;
|
||||
|
||||
volScalarField linearKE
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"linearKE",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field internalE (internal energy density)" << endl;
|
||||
volScalarField internalE
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"internalE",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field iDof (internal degree of freedom density)"
|
||||
<< endl;
|
||||
|
||||
volScalarField iDof
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"iDof",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field q (surface heat transfer)" << endl;
|
||||
volScalarField q
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"q",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Reading field fD (surface force density)" << endl;
|
||||
volVectorField fD
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"fD",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< nl << "Constructing dsmcCloud " << endl;
|
||||
|
||||
dsmcCloud dsmc("dsmc", boundaryT, boundaryU);
|
||||
@ -40,53 +40,21 @@ int main(int argc, char *argv[])
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< nl << "Constructing dsmcCloud " << endl;
|
||||
|
||||
dsmcCloud dsmc("dsmc", mesh);
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
while (runTime.loop())
|
||||
{
|
||||
runTime++;
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// Carry out dsmcCloud timestep
|
||||
|
||||
dsmc.evolve();
|
||||
|
||||
// Retrieve flow field data from dsmcCloud
|
||||
|
||||
rhoN = dsmc.rhoN();
|
||||
rhoN.correctBoundaryConditions();
|
||||
|
||||
rhoM = dsmc.rhoM();
|
||||
rhoM.correctBoundaryConditions();
|
||||
|
||||
dsmcRhoN = dsmc.dsmcRhoN();
|
||||
dsmcRhoN.correctBoundaryConditions();
|
||||
|
||||
momentum = dsmc.momentum();
|
||||
momentum.correctBoundaryConditions();
|
||||
|
||||
linearKE = dsmc.linearKE();
|
||||
linearKE.correctBoundaryConditions();
|
||||
|
||||
internalE = dsmc.internalE();
|
||||
internalE.correctBoundaryConditions();
|
||||
|
||||
iDof = dsmc.iDof();
|
||||
iDof.correctBoundaryConditions();
|
||||
|
||||
// Retrieve surface field data from dsmcCloud
|
||||
|
||||
q = dsmc.q();
|
||||
|
||||
fD = dsmc.fD();
|
||||
|
||||
// Print status of dsmcCloud
|
||||
|
||||
dsmc.info();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Reference in New Issue
Block a user