mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
more appropriate naming: RO (reduced order) referred to the RO model of red blood cells, but the key difference in this solver is the momentum forcing term in the UEqn
144 lines
3.0 KiB
C
Executable File
144 lines
3.0 KiB
C
Executable File
Info<< "Reading field p\n" << endl;
|
|
volScalarField p
|
|
(
|
|
IOobject
|
|
(
|
|
"p",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
Info<< "Reading physical velocity field U" << endl;
|
|
Info<< "Note: only if voidfraction at boundary is 1, U is superficial velocity!!!\n" << endl;
|
|
volVectorField U
|
|
(
|
|
IOobject
|
|
(
|
|
"U",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
Info<< "Reading particle velocity field Us\n" << endl;
|
|
volVectorField Us
|
|
(
|
|
IOobject
|
|
(
|
|
"Us",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
Info<< "Reading the penalization factor field lambda\n" << endl;
|
|
volScalarField lambda
|
|
(
|
|
IOobject
|
|
(
|
|
"lambda",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
//========================
|
|
// drag law modelling
|
|
//========================
|
|
|
|
Info<< "\nCreating dummy density field rho = 1\n" << endl;
|
|
volScalarField rho
|
|
(
|
|
IOobject
|
|
(
|
|
"rho",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::READ_IF_PRESENT,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh,
|
|
dimensionedScalar("0", dimensionSet(1, -3, 0, 0, 0), 1.0)
|
|
);
|
|
|
|
|
|
Info<< "Reading field phiIB\n" << endl;
|
|
volScalarField phiIB
|
|
(
|
|
IOobject
|
|
(
|
|
"phiIB",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
//mod by alice
|
|
Info<< "Reading field voidfraction\n" << endl;
|
|
volScalarField voidfraction
|
|
(
|
|
IOobject
|
|
(
|
|
"voidfraction",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
//========================
|
|
|
|
# include "createPhi.H"
|
|
|
|
label pRefCell = 0;
|
|
scalar pRefValue = 0.0;
|
|
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
|
|
|
|
|
singlePhaseTransportModel laminarTransport(U, phi);
|
|
|
|
autoPtr<incompressible::turbulenceModel> turbulence
|
|
(
|
|
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
|
);
|
|
|
|
//=== dyM ===================
|
|
|
|
Info<< "Reading field interFace\n" << endl;
|
|
volScalarField interFace
|
|
(
|
|
IOobject
|
|
(
|
|
"interFace",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::READ_IF_PRESENT,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh,
|
|
//dimensionedScalar("0", dimensionSet(0, -1, 0, 0, 0), 0.0)
|
|
dimensionedScalar("0", dimensionSet(0, 0, 0, 0, 0), 0.0)
|
|
);
|
|
|
|
//===========================
|
|
|
|
#include "createMRF.H"
|