src/finiteVolume/cfdTools: Removed unused code
Solver modules have replaced code that was previously shared between solvers by means of #include-ing header files. Some of these headers are now unused and have been removed. Others are only now used in a single solver and have been moved into that solver.
This commit is contained in:
35
applications/solvers/basic/thermoFoam/checkRadiationModel.H
Normal file
35
applications/solvers/basic/thermoFoam/checkRadiationModel.H
Normal file
@ -0,0 +1,35 @@
|
||||
if (!mesh.foundObject<IOdictionary>("radiationProperties"))
|
||||
{
|
||||
typeIOobject<IOdictionary> radiationProperties
|
||||
(
|
||||
"radiationProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
);
|
||||
|
||||
if (radiationProperties.headerOk())
|
||||
{
|
||||
const word modelType
|
||||
(
|
||||
IOdictionary(radiationProperties).lookup("radiationModel")
|
||||
);
|
||||
|
||||
if (modelType != "none")
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Radiation model " << modelType
|
||||
<< " selected but not enabled in fvModels" << nl
|
||||
<< "To enable radiation add " << nl << nl
|
||||
<< "radiation" << nl
|
||||
<< "{" << nl
|
||||
<< " type radiation;" << nl
|
||||
<< " libs (\"libradiationModels.so\");" << nl
|
||||
<< "}" << nl << nl
|
||||
<< "to " << radiationProperties.relativePath()/"fvModels"
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Global
|
||||
meshCourantNo
|
||||
|
||||
Description
|
||||
Calculates and outputs the mean and maximum Courant Numbers.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
scalar meshCoNum = 0.0;
|
||||
scalar meanMeshCoNum = 0.0;
|
||||
|
||||
{
|
||||
scalarField sumPhi
|
||||
(
|
||||
fvc::surfaceSum(mag(mesh.phi()))().primitiveField()
|
||||
);
|
||||
|
||||
meshCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
|
||||
|
||||
meanMeshCoNum =
|
||||
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
|
||||
}
|
||||
|
||||
Info<< "Mesh Courant Number mean: " << meanMeshCoNum
|
||||
<< " max: " << meshCoNum << endl;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,54 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2017-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Global
|
||||
createUfIfPresent
|
||||
|
||||
Description
|
||||
Creates and initialises the velocity field Uf if required.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
autoPtr<surfaceVectorField> Uf;
|
||||
|
||||
if (mesh.dynamic())
|
||||
{
|
||||
Info<< "Constructing face velocity Uf\n" << endl;
|
||||
|
||||
Uf = new surfaceVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Uf",
|
||||
runTime.name(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
fvc::interpolate(U)
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
4
applications/solvers/multiphase/driftFluxFoam/gh.H
Normal file
4
applications/solvers/multiphase/driftFluxFoam/gh.H
Normal file
@ -0,0 +1,4 @@
|
||||
Info<< "Calculating field g.h\n" << endl;
|
||||
dimensionedScalar ghRef(- mag(g)*hRef);
|
||||
volScalarField gh("gh", (g & mesh.C()) - ghRef);
|
||||
surfaceScalarField ghf("ghf", (g & mesh.Cf()) - ghRef);
|
||||
13
applications/solvers/multiphase/driftFluxFoam/readhRef.H
Normal file
13
applications/solvers/multiphase/driftFluxFoam/readhRef.H
Normal file
@ -0,0 +1,13 @@
|
||||
Info<< "\nReading hRef" << endl;
|
||||
uniformDimensionedScalarField hRef
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"hRef",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
dimensionedScalar(dimLength, 0)
|
||||
);
|
||||
Reference in New Issue
Block a user