mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
This commit is contained in:
@ -3,6 +3,21 @@ OpenFOAM-1706
|
|||||||
Known Build Issues
|
Known Build Issues
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
Intel MPI (Gcc/Clang)
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Either I_MPI_ROOT or MPI_ROOT can be used to specify the Intel-MPI
|
||||||
|
installation directory path.
|
||||||
|
|
||||||
|
The ThirdParty build of ptscotch uses `mpiicc` for Intel-MPI
|
||||||
|
instead of the usual `mpicc`.
|
||||||
|
When gcc or clang are used, it is highly likely that the
|
||||||
|
I_MPI_CC environment variable also needs to be set accordingly.
|
||||||
|
|
||||||
|
See `mpiicc -help` for more information about environment variables.
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
Intel Compiler
|
Intel Compiler
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
@ -40,15 +40,14 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
|
|||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(modelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown PDRDragModel type "
|
<< "Unknown PDRDragModel type "
|
||||||
<< modelType << nl << nl
|
<< modelType << nl << nl
|
||||||
<< "Valid PDRDragModels are : " << endl
|
<< "Valid PDRDragModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,15 +39,14 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
|
|||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(modelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown XiEqModel type "
|
<< "Unknown XiEqModel type "
|
||||||
<< modelType << nl << nl
|
<< modelType << nl << nl
|
||||||
<< "Valid XiEqModels are : " << endl
|
<< "Valid XiEqModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,15 +39,14 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
|
|||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(modelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown XiGModel type "
|
<< "Unknown XiGModel type "
|
||||||
<< modelType << nl << nl
|
<< modelType << nl << nl
|
||||||
<< "Valid XiGModels are : " << endl
|
<< "Valid XiGModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,15 +42,14 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
|
|||||||
|
|
||||||
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
Info<< "Selecting flame-wrinkling model " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(modelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown XiModel type "
|
<< "Unknown XiModel type "
|
||||||
<< modelType << nl << nl
|
<< modelType << nl << nl
|
||||||
<< "Valid XiModels are : " << endl
|
<< "Valid XiModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,6 +34,7 @@ License
|
|||||||
#include "fvcFlux.H"
|
#include "fvcFlux.H"
|
||||||
#include "fvcMeshPhi.H"
|
#include "fvcMeshPhi.H"
|
||||||
#include "surfaceInterpolate.H"
|
#include "surfaceInterpolate.H"
|
||||||
|
#include "unitConversion.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -43,10 +44,6 @@ namespace Foam
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::scalar Foam::multiphaseMixtureThermo::convertToRad =
|
|
||||||
Foam::constant::mathematical::pi/180.0;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
void Foam::multiphaseMixtureThermo::calcAlphas()
|
void Foam::multiphaseMixtureThermo::calcAlphas()
|
||||||
@ -855,7 +852,7 @@ void Foam::multiphaseMixtureThermo::correctContactAngle
|
|||||||
|
|
||||||
bool matched = (tp.key().first() == alpha1.name());
|
bool matched = (tp.key().first() == alpha1.name());
|
||||||
|
|
||||||
scalar theta0 = convertToRad*tp().theta0(matched);
|
const scalar theta0 = degToRad(tp().theta0(matched));
|
||||||
scalarField theta(boundary[patchi].size(), theta0);
|
scalarField theta(boundary[patchi].size(), theta0);
|
||||||
|
|
||||||
scalar uTheta = tp().uTheta();
|
scalar uTheta = tp().uTheta();
|
||||||
@ -863,8 +860,8 @@ void Foam::multiphaseMixtureThermo::correctContactAngle
|
|||||||
// Calculate the dynamic contact angle if required
|
// Calculate the dynamic contact angle if required
|
||||||
if (uTheta > SMALL)
|
if (uTheta > SMALL)
|
||||||
{
|
{
|
||||||
scalar thetaA = convertToRad*tp().thetaA(matched);
|
const scalar thetaA = degToRad(tp().thetaA(matched));
|
||||||
scalar thetaR = convertToRad*tp().thetaR(matched);
|
const scalar thetaR = degToRad(tp().thetaR(matched));
|
||||||
|
|
||||||
// Calculated the component of the velocity parallel to the wall
|
// Calculated the component of the velocity parallel to the wall
|
||||||
vectorField Uwall
|
vectorField Uwall
|
||||||
|
|||||||
@ -144,9 +144,6 @@ private:
|
|||||||
//- Stabilisation for normalisation of the interface normal
|
//- Stabilisation for normalisation of the interface normal
|
||||||
const dimensionedScalar deltaN_;
|
const dimensionedScalar deltaN_;
|
||||||
|
|
||||||
//- Conversion factor for degrees into radians
|
|
||||||
static const scalar convertToRad;
|
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
|
|||||||
@ -41,15 +41,14 @@ Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New
|
|||||||
|
|
||||||
Info<< "Selecting incompressible transport model " << modelType << endl;
|
Info<< "Selecting incompressible transport model " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(modelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown mixtureViscosityModel type "
|
<< "Unknown mixtureViscosityModel type "
|
||||||
<< modelType << nl << nl
|
<< modelType << nl << nl
|
||||||
<< "Valid mixtureViscosityModels are : " << endl
|
<< "Valid mixtureViscosityModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,19 +104,18 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
|
|||||||
const incompressibleTwoPhaseInteractingMixture& mixture
|
const incompressibleTwoPhaseInteractingMixture& mixture
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word modelType(dict.lookup(typeName));
|
const word modelType(dict.lookup(typeName));
|
||||||
|
|
||||||
Info<< "Selecting relative velocity model " << modelType << endl;
|
Info<< "Selecting relative velocity model " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(modelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown time scale model type " << modelType
|
<< "Unknown time scale model type "
|
||||||
<< ", constructor not in hash table" << nl << nl
|
<< modelType << nl << nl
|
||||||
<< " Valid time scale model types are:" << nl
|
<< "Valid time scale model types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
@ -141,13 +140,13 @@ Foam::relativeVelocityModel::~relativeVelocityModel()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
tmp<volScalarField> Foam::relativeVelocityModel::rho() const
|
Foam::tmp<Foam::volScalarField> Foam::relativeVelocityModel::rho() const
|
||||||
{
|
{
|
||||||
return alphac_*rhoc_ + alphad_*rhod_;
|
return alphac_*rhoc_ + alphad_*rhod_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmp<volSymmTensorField> Foam::relativeVelocityModel::tauDm() const
|
Foam::tmp<Foam::volSymmTensorField> Foam::relativeVelocityModel::tauDm() const
|
||||||
{
|
{
|
||||||
volScalarField betac(alphac_*rhoc_);
|
volScalarField betac(alphac_*rhoc_);
|
||||||
volScalarField betad(alphad_*rhod_);
|
volScalarField betad(alphad_*rhod_);
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
word temperaturePhaseChangeTwoPhaseMixtureTypeName
|
const word modelType
|
||||||
(
|
(
|
||||||
phaseChangePropertiesDict.lookup
|
phaseChangePropertiesDict.lookup
|
||||||
(
|
(
|
||||||
@ -56,19 +56,16 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Selecting phaseChange model "
|
Info<< "Selecting phaseChange model " << modelType << endl;
|
||||||
<< temperaturePhaseChangeTwoPhaseMixtureTypeName << endl;
|
|
||||||
|
|
||||||
componentsConstructorTable::iterator cstrIter =
|
auto cstrIter = componentsConstructorTablePtr_->cfind(modelType);
|
||||||
componentsConstructorTablePtr_
|
|
||||||
->find(temperaturePhaseChangeTwoPhaseMixtureTypeName);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown temperaturePhaseChangeTwoPhaseMixture type "
|
<< "Unknown temperaturePhaseChangeTwoPhaseMixture type "
|
||||||
<< temperaturePhaseChangeTwoPhaseMixtureTypeName << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid temperaturePhaseChangeTwoPhaseMixtures are : " << endl
|
<< "Valid temperaturePhaseChangeTwoPhaseMixture types :" << endl
|
||||||
<< componentsConstructorTablePtr_->sortedToc()
|
<< componentsConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,12 +30,7 @@ License
|
|||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
#include "fvcGrad.H"
|
#include "fvcGrad.H"
|
||||||
#include "fvcSnGrad.H"
|
#include "fvcSnGrad.H"
|
||||||
|
#include "unitConversion.H"
|
||||||
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
const Foam::scalar Foam::threePhaseInterfaceProperties::convertToRad =
|
|
||||||
Foam::constant::mathematical::pi/180.0;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -83,7 +78,7 @@ void Foam::threePhaseInterfaceProperties::correctContactAngle
|
|||||||
|
|
||||||
scalarField theta
|
scalarField theta
|
||||||
(
|
(
|
||||||
convertToRad
|
degToRad()
|
||||||
* (
|
* (
|
||||||
twoPhaseAlpha2*(180 - a2cap.theta(U[patchi], nHatp))
|
twoPhaseAlpha2*(180 - a2cap.theta(U[patchi], nHatp))
|
||||||
+ twoPhaseAlpha3*(180 - a3cap.theta(U[patchi], nHatp))
|
+ twoPhaseAlpha3*(180 - a3cap.theta(U[patchi], nHatp))
|
||||||
|
|||||||
@ -91,10 +91,6 @@ class threePhaseInterfaceProperties
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Conversion factor for degrees into radians
|
|
||||||
static const scalar convertToRad;
|
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from volume fraction field alpha and IOdictionary
|
//- Construct from volume fraction field alpha and IOdictionary
|
||||||
|
|||||||
@ -48,24 +48,21 @@ Foam::phaseChangeTwoPhaseMixture::New
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
word phaseChangeTwoPhaseMixtureTypeName
|
const word modelType
|
||||||
(
|
(
|
||||||
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
|
transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture")
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Selecting phaseChange model "
|
Info<< "Selecting phaseChange model " << modelType << endl;
|
||||||
<< phaseChangeTwoPhaseMixtureTypeName << endl;
|
|
||||||
|
|
||||||
componentsConstructorTable::iterator cstrIter =
|
auto cstrIter = componentsConstructorTablePtr_->cfind(modelType);
|
||||||
componentsConstructorTablePtr_
|
|
||||||
->find(phaseChangeTwoPhaseMixtureTypeName);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown phaseChangeTwoPhaseMixture type "
|
<< "Unknown phaseChangeTwoPhaseMixture type "
|
||||||
<< phaseChangeTwoPhaseMixtureTypeName << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid phaseChangeTwoPhaseMixtures are : " << endl
|
<< "Valid phaseChangeTwoPhaseMixture types :" << endl
|
||||||
<< componentsConstructorTablePtr_->sortedToc()
|
<< componentsConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,22 +34,21 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
|||||||
const phaseModel& phase2
|
const phaseModel& phase2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word dragModelType(interfaceDict.lookup("type"));
|
const word modelType(interfaceDict.lookup("type"));
|
||||||
|
|
||||||
Info << "Selecting dragModel for phase "
|
Info << "Selecting dragModel for phase "
|
||||||
<< phase1.name()
|
<< phase1.name()
|
||||||
<< ": "
|
<< ": "
|
||||||
<< dragModelType << endl;
|
<< modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(dragModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown dragModelType type "
|
<< "Unknown dragModel type "
|
||||||
<< dragModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid dragModel types are : " << endl
|
<< "Valid dragModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
|||||||
const phaseModel& phase2
|
const phaseModel& phase2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word heatTransferModelType
|
const word modelType
|
||||||
(
|
(
|
||||||
interfaceDict.lookup("heatTransferModel" + phase1.name())
|
interfaceDict.lookup("heatTransferModel" + phase1.name())
|
||||||
);
|
);
|
||||||
@ -43,17 +43,16 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
|||||||
Info<< "Selecting heatTransferModel for phase "
|
Info<< "Selecting heatTransferModel for phase "
|
||||||
<< phase1.name()
|
<< phase1.name()
|
||||||
<< ": "
|
<< ": "
|
||||||
<< heatTransferModelType << endl;
|
<< modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(heatTransferModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown heatTransferModelType type "
|
<< "Unknown heatTransferModel type "
|
||||||
<< heatTransferModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid heatTransferModel types are : " << endl
|
<< "Valid heatTransferModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
|||||||
const phaseModel& phase
|
const phaseModel& phase
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word diameterModelType
|
const word modelType(dict.lookup("diameterModel"));
|
||||||
(
|
|
||||||
dict.lookup("diameterModel")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info << "Selecting diameterModel for phase "
|
Info << "Selecting diameterModel for phase "
|
||||||
<< phase.name()
|
<< phase.name()
|
||||||
<< ": "
|
<< ": "
|
||||||
<< diameterModelType << endl;
|
<< modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(diameterModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown diameterModelType type "
|
<< "Unknown diameterModel type "
|
||||||
<< diameterModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid diameterModel types are : " << endl
|
<< "Valid diameterModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cstrIter()
|
return cstrIter()
|
||||||
(
|
(
|
||||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
dict.optionalSubDict(modelType + "Coeffs"),
|
||||||
phase
|
phase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,12 +35,7 @@ License
|
|||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
#include "fvcFlux.H"
|
#include "fvcFlux.H"
|
||||||
#include "fvcAverage.H"
|
#include "fvcAverage.H"
|
||||||
|
#include "unitConversion.H"
|
||||||
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
const Foam::scalar Foam::multiphaseSystem::convertToRad =
|
|
||||||
Foam::constant::mathematical::pi/180.0;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -290,7 +285,7 @@ void Foam::multiphaseSystem::correctContactAngle
|
|||||||
|
|
||||||
bool matched = (tp.key().first() == phase1.name());
|
bool matched = (tp.key().first() == phase1.name());
|
||||||
|
|
||||||
scalar theta0 = convertToRad*tp().theta0(matched);
|
const scalar theta0 = degToRad(tp().theta0(matched));
|
||||||
scalarField theta(boundary[patchi].size(), theta0);
|
scalarField theta(boundary[patchi].size(), theta0);
|
||||||
|
|
||||||
scalar uTheta = tp().uTheta();
|
scalar uTheta = tp().uTheta();
|
||||||
@ -298,8 +293,8 @@ void Foam::multiphaseSystem::correctContactAngle
|
|||||||
// Calculate the dynamic contact angle if required
|
// Calculate the dynamic contact angle if required
|
||||||
if (uTheta > SMALL)
|
if (uTheta > SMALL)
|
||||||
{
|
{
|
||||||
scalar thetaA = convertToRad*tp().thetaA(matched);
|
const scalar thetaA = degToRad(tp().thetaA(matched));
|
||||||
scalar thetaR = convertToRad*tp().thetaR(matched);
|
const scalar thetaR = degToRad(tp().thetaR(matched));
|
||||||
|
|
||||||
// Calculated the component of the velocity parallel to the wall
|
// Calculated the component of the velocity parallel to the wall
|
||||||
vectorField Uwall
|
vectorField Uwall
|
||||||
|
|||||||
@ -187,9 +187,6 @@ private:
|
|||||||
//- Stabilisation for normalisation of the interface normal
|
//- Stabilisation for normalisation of the interface normal
|
||||||
const dimensionedScalar deltaN_;
|
const dimensionedScalar deltaN_;
|
||||||
|
|
||||||
//- Conversion factor for degrees into radians
|
|
||||||
static const scalar convertToRad;
|
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
|
|||||||
@ -33,12 +33,7 @@ License
|
|||||||
#include "fvcSnGrad.H"
|
#include "fvcSnGrad.H"
|
||||||
#include "fvcDiv.H"
|
#include "fvcDiv.H"
|
||||||
#include "fvcFlux.H"
|
#include "fvcFlux.H"
|
||||||
|
#include "unitConversion.H"
|
||||||
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
const Foam::scalar Foam::multiphaseMixture::convertToRad =
|
|
||||||
Foam::constant::mathematical::pi/180.0;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -456,7 +451,7 @@ void Foam::multiphaseMixture::correctContactAngle
|
|||||||
|
|
||||||
bool matched = (tp.key().first() == alpha1.name());
|
bool matched = (tp.key().first() == alpha1.name());
|
||||||
|
|
||||||
scalar theta0 = convertToRad*tp().theta0(matched);
|
const scalar theta0 = degToRad(tp().theta0(matched));
|
||||||
scalarField theta(boundary[patchi].size(), theta0);
|
scalarField theta(boundary[patchi].size(), theta0);
|
||||||
|
|
||||||
scalar uTheta = tp().uTheta();
|
scalar uTheta = tp().uTheta();
|
||||||
@ -464,8 +459,8 @@ void Foam::multiphaseMixture::correctContactAngle
|
|||||||
// Calculate the dynamic contact angle if required
|
// Calculate the dynamic contact angle if required
|
||||||
if (uTheta > SMALL)
|
if (uTheta > SMALL)
|
||||||
{
|
{
|
||||||
scalar thetaA = convertToRad*tp().thetaA(matched);
|
const scalar thetaA = degToRad(tp().thetaA(matched));
|
||||||
scalar thetaR = convertToRad*tp().thetaR(matched);
|
const scalar thetaR = degToRad(tp().thetaR(matched));
|
||||||
|
|
||||||
// Calculated the component of the velocity parallel to the wall
|
// Calculated the component of the velocity parallel to the wall
|
||||||
vectorField Uwall
|
vectorField Uwall
|
||||||
|
|||||||
@ -154,9 +154,6 @@ private:
|
|||||||
//- Stabilisation for normalisation of the interface normal
|
//- Stabilisation for normalisation of the interface normal
|
||||||
const dimensionedScalar deltaN_;
|
const dimensionedScalar deltaN_;
|
||||||
|
|
||||||
//- Conversion factor for degrees into radians
|
|
||||||
static const scalar convertToRad;
|
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ Foam::interfaceCompositionModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word interfaceCompositionModelType
|
const word modelType
|
||||||
(
|
(
|
||||||
word(dict.lookup("type"))
|
word(dict.lookup("type"))
|
||||||
+ "<"
|
+ "<"
|
||||||
@ -47,17 +47,16 @@ Foam::interfaceCompositionModel::New
|
|||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Selecting interfaceCompositionModel for "
|
Info<< "Selecting interfaceCompositionModel for "
|
||||||
<< pair << ": " << interfaceCompositionModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(interfaceCompositionModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown interfaceCompositionModelType type "
|
<< "Unknown interfaceCompositionModel type "
|
||||||
<< interfaceCompositionModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid interfaceCompositionModel types are : " << endl
|
<< "Valid interfaceCompositionModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::massTransferModel> Foam::massTransferModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word massTransferModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting massTransferModel for "
|
Info<< "Selecting massTransferModel for "
|
||||||
<< pair << ": " << massTransferModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(massTransferModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown massTransferModelType type "
|
<< "Unknown massTransferModel type "
|
||||||
<< massTransferModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid massTransferModel types are : " << endl
|
<< "Valid massTransferModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,20 +32,18 @@ Foam::autoPtr<Foam::saturationModel> Foam::saturationModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word saturationModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting saturationModel: "
|
Info<< "Selecting saturationModel: " << modelType << endl;
|
||||||
<< saturationModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(saturationModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown saturationModelType type "
|
<< "Unknown saturationModel type "
|
||||||
<< saturationModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid saturationModel types are : " << endl
|
<< "Valid saturationModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,20 +35,19 @@ Foam::surfaceTensionModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word surfaceTensionModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting surfaceTensionModel for "
|
Info<< "Selecting surfaceTensionModel for "
|
||||||
<< pair << ": " << surfaceTensionModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
multiphaseConstructorTable::iterator cstrIter =
|
auto cstrIter = multiphaseConstructorTablePtr_->cfind(modelType);
|
||||||
multiphaseConstructorTablePtr_->find(surfaceTensionModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown surfaceTensionModelType type "
|
<< "Unknown surfaceTensionModel type "
|
||||||
<< surfaceTensionModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid surfaceTensionModel types are : " << endl
|
<< "Valid surfaceTensionModel types :" << endl
|
||||||
<< multiphaseConstructorTablePtr_->sortedToc()
|
<< multiphaseConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,20 +35,19 @@ Foam::aspectRatioModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word aspectRatioModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting aspectRatioModel for "
|
Info<< "Selecting aspectRatioModel for "
|
||||||
<< pair << ": " << aspectRatioModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(aspectRatioModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown aspectRatioModelType type "
|
<< "Unknown aspectRatioModel type "
|
||||||
<< aspectRatioModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid aspectRatioModel types are : " << endl
|
<< "Valid aspectRatioModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word dragModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting dragModel for "
|
Info<< "Selecting dragModel for "
|
||||||
<< pair << ": " << dragModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(dragModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown dragModelType type "
|
<< "Unknown dragModel type "
|
||||||
<< dragModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid dragModel types are : " << endl
|
<< "Valid dragModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word heatTransferModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting heatTransferModel for "
|
Info<< "Selecting heatTransferModel for "
|
||||||
<< pair << ": " << heatTransferModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(heatTransferModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown heatTransferModelType type "
|
<< "Unknown heatTransferModel type "
|
||||||
<< heatTransferModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid heatTransferModel types are : " << endl
|
<< "Valid heatTransferModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word liftModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting liftModel for "
|
Info<< "Selecting liftModel for "
|
||||||
<< pair << ": " << liftModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(liftModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown liftModelType type "
|
<< "Unknown liftModel type "
|
||||||
<< liftModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid liftModel types are : " << endl
|
<< "Valid liftModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,20 +35,19 @@ Foam::swarmCorrection::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word swarmCorrectionType(dict.lookup("type"));
|
const word correctionType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting swarmCorrection for "
|
Info<< "Selecting swarmCorrection for "
|
||||||
<< pair << ": " << swarmCorrectionType << endl;
|
<< pair << ": " << correctionType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(correctionType);
|
||||||
dictionaryConstructorTablePtr_->find(swarmCorrectionType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown swarmCorrectionType type "
|
<< "Unknown swarmCorrection type "
|
||||||
<< swarmCorrectionType << endl << endl
|
<< correctionType << nl << nl
|
||||||
<< "Valid swarmCorrection types are : " << endl
|
<< "Valid swarmCorrection types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,20 +35,19 @@ Foam::turbulentDispersionModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word turbulentDispersionModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting turbulentDispersionModel for "
|
Info<< "Selecting turbulentDispersionModel for "
|
||||||
<< pair << ": " << turbulentDispersionModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(turbulentDispersionModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown turbulentDispersionModelType type "
|
<< "Unknown turbulentDispersionModel type "
|
||||||
<< turbulentDispersionModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid turbulentDispersionModel types are : " << endl
|
<< "Valid turbulentDispersionModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word virtualMassModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting virtualMassModel for "
|
Info<< "Selecting virtualMassModel for "
|
||||||
<< pair << ": " << virtualMassModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(virtualMassModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown virtualMassModelType type "
|
<< "Unknown virtualMassModel type "
|
||||||
<< virtualMassModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid virtualMassModel types are : " << endl
|
<< "Valid virtualMassModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallDampingModel> Foam::wallDampingModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word wallDampingModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting wallDampingModel for "
|
Info<< "Selecting wallDampingModel for "
|
||||||
<< pair << ": " << wallDampingModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(wallDampingModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown wallDampingModelType type "
|
<< "Unknown wallDampingModel type "
|
||||||
<< wallDampingModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid wallDampingModel types are : " << endl
|
<< "Valid wallDampingModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word wallLubricationModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting wallLubricationModel for "
|
Info<< "Selecting wallLubricationModel for "
|
||||||
<< pair << ": " << wallLubricationModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(wallLubricationModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown wallLubricationModelType type "
|
<< "Unknown wallLubricationModel type "
|
||||||
<< wallLubricationModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid wallLubricationModel types are : " << endl
|
<< "Valid wallLubricationModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,20 +33,19 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
|
|||||||
const wordList& phaseNames
|
const wordList& phaseNames
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word blendingMethodType(dict.lookup("type"));
|
const word methodType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting " << dict.dictName() << " blending method: "
|
Info<< "Selecting " << dict.dictName() << " blending method: "
|
||||||
<< blendingMethodType << endl;
|
<< methodType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodType);
|
||||||
dictionaryConstructorTablePtr_->find(blendingMethodType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown blendingMethodType type "
|
<< "Unknown blendingMethod type "
|
||||||
<< blendingMethodType << endl << endl
|
<< methodType << nl << nl
|
||||||
<< "Valid blendingMethod types are : " << endl
|
<< "Valid blendingMethod types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
|||||||
const phaseModel& phase
|
const phaseModel& phase
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word diameterModelType
|
const word modelType(dict.lookup("diameterModel"));
|
||||||
(
|
|
||||||
dict.lookup("diameterModel")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info << "Selecting diameterModel for phase "
|
Info << "Selecting diameterModel for phase "
|
||||||
<< phase.name()
|
<< phase.name()
|
||||||
<< ": "
|
<< ": "
|
||||||
<< diameterModelType << endl;
|
<< modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(diameterModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown diameterModelType type "
|
<< "Unknown diameterModel type "
|
||||||
<< diameterModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid diameterModel types are : " << endl
|
<< "Valid diameterModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cstrIter()
|
return cstrIter()
|
||||||
(
|
(
|
||||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
dict.optionalSubDict(modelType + "Coeffs"),
|
||||||
phase
|
phase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,20 +35,19 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
|
|||||||
const label index
|
const label index
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word phaseModelType(fluid.subDict(phaseName).lookup("type"));
|
const word modelType(fluid.subDict(phaseName).lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting phaseModel for "
|
Info<< "Selecting phaseModel for "
|
||||||
<< phaseName << ": " << phaseModelType << endl;
|
<< phaseName << ": " << modelType << endl;
|
||||||
|
|
||||||
phaseSystemConstructorTable::iterator cstrIter =
|
auto cstrIter = phaseSystemConstructorTablePtr_->cfind(modelType);
|
||||||
phaseSystemConstructorTablePtr_->find(phaseModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown phaseModelType type "
|
<< "Unknown phaseModel type "
|
||||||
<< phaseModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid phaseModel types are : " << endl
|
<< "Valid phaseModel types :" << endl
|
||||||
<< phaseSystemConstructorTablePtr_->sortedToc()
|
<< phaseSystemConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,8 @@ License
|
|||||||
#include "fvmLaplacian.H"
|
#include "fvmLaplacian.H"
|
||||||
#include "fvmSup.H"
|
#include "fvmSup.H"
|
||||||
|
|
||||||
|
#include "unitConversion.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -48,9 +50,6 @@ namespace Foam
|
|||||||
defineRunTimeSelectionTable(multiphaseSystem, dictionary);
|
defineRunTimeSelectionTable(multiphaseSystem, dictionary);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Foam::scalar Foam::multiphaseSystem::convertToRad =
|
|
||||||
Foam::constant::mathematical::pi/180.0;
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -399,7 +398,7 @@ void Foam::multiphaseSystem::correctContactAngle
|
|||||||
|
|
||||||
bool matched = (tp.key().first() == phase1.name());
|
bool matched = (tp.key().first() == phase1.name());
|
||||||
|
|
||||||
scalar theta0 = convertToRad*tp().theta0(matched);
|
const scalar theta0 = degToRad(tp().theta0(matched));
|
||||||
scalarField theta(boundary[patchi].size(), theta0);
|
scalarField theta(boundary[patchi].size(), theta0);
|
||||||
|
|
||||||
scalar uTheta = tp().uTheta();
|
scalar uTheta = tp().uTheta();
|
||||||
@ -407,8 +406,8 @@ void Foam::multiphaseSystem::correctContactAngle
|
|||||||
// Calculate the dynamic contact angle if required
|
// Calculate the dynamic contact angle if required
|
||||||
if (uTheta > SMALL)
|
if (uTheta > SMALL)
|
||||||
{
|
{
|
||||||
scalar thetaA = convertToRad*tp().thetaA(matched);
|
const scalar thetaA = degToRad(tp().thetaA(matched));
|
||||||
scalar thetaR = convertToRad*tp().thetaR(matched);
|
const scalar thetaR = degToRad(tp().thetaR(matched));
|
||||||
|
|
||||||
// Calculated the component of the velocity parallel to the wall
|
// Calculated the component of the velocity parallel to the wall
|
||||||
vectorField Uwall
|
vectorField Uwall
|
||||||
|
|||||||
@ -65,9 +65,6 @@ class multiphaseSystem
|
|||||||
//- Stabilisation for normalisation of the interface normal
|
//- Stabilisation for normalisation of the interface normal
|
||||||
const dimensionedScalar deltaN_;
|
const dimensionedScalar deltaN_;
|
||||||
|
|
||||||
//- Conversion factor for degrees into radians
|
|
||||||
static const scalar convertToRad;
|
|
||||||
|
|
||||||
|
|
||||||
// Private member functions
|
// Private member functions
|
||||||
|
|
||||||
@ -207,10 +204,6 @@ public:
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#include "multiphaseSystemI.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
|
|||||||
const fvMesh& mesh
|
const fvMesh& mesh
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word multiphaseSystemType
|
const word systemType
|
||||||
(
|
(
|
||||||
IOdictionary
|
IOdictionary
|
||||||
(
|
(
|
||||||
@ -48,18 +48,16 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
|
|||||||
).lookup("type")
|
).lookup("type")
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Selecting multiphaseSystem "
|
Info<< "Selecting multiphaseSystem " << systemType << endl;
|
||||||
<< multiphaseSystemType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType);
|
||||||
dictionaryConstructorTablePtr_->find(multiphaseSystemType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown multiphaseSystemType type "
|
<< "Unknown multiphaseSystem type "
|
||||||
<< multiphaseSystemType << endl << endl
|
<< systemType << nl << nl
|
||||||
<< "Valid multiphaseSystem types are : " << endl
|
<< "Valid multiphaseSystem types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,26 +43,17 @@ using namespace Foam::constant::mathematical;
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<>
|
const Foam::Enum
|
||||||
const char* Foam::NamedEnum
|
|
||||||
<
|
<
|
||||||
Foam::compressible::
|
Foam::compressible::
|
||||||
alphatWallBoilingWallFunctionFvPatchScalarField::phaseType,
|
alphatWallBoilingWallFunctionFvPatchScalarField::phaseType
|
||||||
2
|
|
||||||
>::names[] =
|
|
||||||
{
|
|
||||||
"vapor",
|
|
||||||
"liquid"
|
|
||||||
};
|
|
||||||
|
|
||||||
const Foam::NamedEnum
|
|
||||||
<
|
|
||||||
Foam::compressible::
|
|
||||||
alphatWallBoilingWallFunctionFvPatchScalarField::phaseType,
|
|
||||||
2
|
|
||||||
>
|
>
|
||||||
Foam::compressible::
|
Foam::compressible::
|
||||||
alphatWallBoilingWallFunctionFvPatchScalarField::phaseTypeNames_;
|
alphatWallBoilingWallFunctionFvPatchScalarField::phaseTypeNames_
|
||||||
|
{
|
||||||
|
{ phaseType::vaporPhase, "vapor" },
|
||||||
|
{ phaseType::liquidPhase, "liquid" },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -111,7 +102,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict),
|
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(p, iF, dict),
|
||||||
phaseType_(phaseTypeNames_.read(dict.lookup("phaseType"))),
|
phaseType_(phaseTypeNames_.lookup("phaseType", dict)),
|
||||||
relax_(dict.lookupOrDefault<scalar>("relax", 0.5)),
|
relax_(dict.lookupOrDefault<scalar>("relax", 0.5)),
|
||||||
AbyV_(p.size(), 0),
|
AbyV_(p.size(), 0),
|
||||||
alphatConv_(p.size(), 0),
|
alphatConv_(p.size(), 0),
|
||||||
|
|||||||
@ -164,7 +164,7 @@ private:
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Heat source type names
|
//- Heat source type names
|
||||||
static const NamedEnum<phaseType, 2> phaseTypeNames_;
|
static const Enum<phaseType> phaseTypeNames_;
|
||||||
|
|
||||||
//- Heat source type
|
//- Heat source type
|
||||||
phaseType phaseType_;
|
phaseType phaseType_;
|
||||||
|
|||||||
@ -33,20 +33,18 @@ Foam::wallBoilingModels::departureDiameterModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word departureDiameterModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting departureDiameterModel: "
|
Info<< "Selecting departureDiameterModel: " << modelType << endl;
|
||||||
<< departureDiameterModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(departureDiameterModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown departureDiameterModelType type "
|
<< "Unknown departureDiameterModel type "
|
||||||
<< departureDiameterModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid departureDiameterModel types are : " << endl
|
<< "Valid departureDiameterModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,20 +33,18 @@ Foam::wallBoilingModels::departureFrequencyModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word departureFrequencyModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting departureFrequencyModel: "
|
Info<< "Selecting departureFrequencyModel: " << modelType << endl;
|
||||||
<< departureFrequencyModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(departureFrequencyModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown departureFrequencyModelType type "
|
<< "Unknown departureFrequencyModel type "
|
||||||
<< departureFrequencyModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid departureFrequencyModel types are : " << endl
|
<< "Valid departureFrequencyModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,20 +33,18 @@ Foam::wallBoilingModels::nucleationSiteModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word nucleationSiteModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting nucleationSiteModel: "
|
Info<< "Selecting nucleationSiteModel: " << modelType << endl;
|
||||||
<< nucleationSiteModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(nucleationSiteModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown nucleationSiteModelType type "
|
<< "Unknown nucleationSiteModel type "
|
||||||
<< nucleationSiteModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid nucleationSiteModel types are : " << endl
|
<< "Valid nucleationSiteModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,20 +33,18 @@ Foam::wallBoilingModels::partitioningModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word partitioningModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting partitioningModel: "
|
Info<< "Selecting partitioningModel: " << modelType << endl;
|
||||||
<< partitioningModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(partitioningModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown partitioningModelType type "
|
<< "Unknown partitioningModel type "
|
||||||
<< partitioningModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid partitioningModel types are : " << endl
|
<< "Valid partitioningModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,23 +33,20 @@ Foam::kineticTheoryModels::conductivityModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word conductivityModelType(dict.lookup("conductivityModel"));
|
const word modelType(dict.lookup("conductivityModel"));
|
||||||
|
|
||||||
Info<< "Selecting conductivityModel "
|
Info<< "Selecting conductivityModel " << modelType << endl;
|
||||||
<< conductivityModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(conductivityModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "conductivityModel::New(const dictionary&) : " << endl
|
<< "Unknown conductivityModel type "
|
||||||
<< " unknown conductivityModelType type "
|
<< modelType << nl << nl
|
||||||
<< conductivityModelType
|
<< "Valid conductivityModel types :" << endl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid conductivityModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<conductivityModel>(cstrIter()(dict));
|
return autoPtr<conductivityModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::frictionalStressModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word frictionalStressModelType(dict.lookup("frictionalStressModel"));
|
const word modelType(dict.lookup("frictionalStressModel"));
|
||||||
|
|
||||||
Info<< "Selecting frictionalStressModel "
|
Info<< "Selecting frictionalStressModel " << modelType << endl;
|
||||||
<< frictionalStressModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "frictionalStressModel::New(const dictionary&) : " << endl
|
<< "Unknown frictionalStressModel type "
|
||||||
<< " unknown frictionalStressModelType type "
|
<< modelType << nl << nl
|
||||||
<< frictionalStressModelType
|
<< "Valid frictionalStressModel types :" << endl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid frictionalStressModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<frictionalStressModel>(cstrIter()(dict));
|
return autoPtr<frictionalStressModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::granularPressureModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word granularPressureModelType(dict.lookup("granularPressureModel"));
|
const word modelType(dict.lookup("granularPressureModel"));
|
||||||
|
|
||||||
Info<< "Selecting granularPressureModel "
|
Info<< "Selecting granularPressureModel " << modelType << endl;
|
||||||
<< granularPressureModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(granularPressureModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "granularPressureModel::New(const dictionary&) : " << endl
|
<< "Unknown granularPressureModel type "
|
||||||
<< " unknown granularPressureModelType type "
|
<< modelType << nl << nl
|
||||||
<< granularPressureModelType
|
<< "Valid granularPressureModel types : " << nl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid granularPressureModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<granularPressureModel>(cstrIter()(dict));
|
return autoPtr<granularPressureModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::radialModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word radialModelType(dict.lookup("radialModel"));
|
const word modelType(dict.lookup("radialModel"));
|
||||||
|
|
||||||
Info<< "Selecting radialModel "
|
Info<< "Selecting radialModel " << modelType << endl;
|
||||||
<< radialModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(radialModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "radialModel::New(const dictionary&) : " << endl
|
<< "Unknown radialModel type "
|
||||||
<< " unknown radialModelType type "
|
<< modelType << nl << nl
|
||||||
<< radialModelType
|
<< "Valid radialModel types :" << endl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid radialModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<radialModel>(cstrIter()(dict));
|
return autoPtr<radialModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,23 +33,20 @@ Foam::kineticTheoryModels::viscosityModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word viscosityModelType(dict.lookup("viscosityModel"));
|
const word modelType(dict.lookup("viscosityModel"));
|
||||||
|
|
||||||
Info<< "Selecting viscosityModel "
|
Info<< "Selecting viscosityModel " << modelType << endl;
|
||||||
<< viscosityModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(viscosityModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "viscosityModel::New(const dictionary&) : " << endl
|
<< "Unknown viscosityModel type "
|
||||||
<< " unknown viscosityModelType type "
|
<< modelType << nl << nl
|
||||||
<< viscosityModelType
|
<< "Valid viscosityModel types :" << nl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid viscosityModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<viscosityModel>(cstrIter()(dict));
|
return autoPtr<viscosityModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -50,15 +50,14 @@ Foam::diameterModels::IATEsource::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(type);
|
||||||
dictionaryConstructorTablePtr_->find(type);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown IATE source type "
|
<< "Unknown IATE source type "
|
||||||
<< type << nl << nl
|
<< type << nl << nl
|
||||||
<< "Valid IATE source types : " << endl
|
<< "Valid IATE source types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ Foam::autoPtr<Foam::twoPhaseSystem> Foam::twoPhaseSystem::New
|
|||||||
const fvMesh& mesh
|
const fvMesh& mesh
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
const word twoPhaseSystemType
|
const word systemType
|
||||||
(
|
(
|
||||||
IOdictionary
|
IOdictionary
|
||||||
(
|
(
|
||||||
@ -48,18 +48,16 @@ Foam::autoPtr<Foam::twoPhaseSystem> Foam::twoPhaseSystem::New
|
|||||||
).lookup("type")
|
).lookup("type")
|
||||||
);
|
);
|
||||||
|
|
||||||
Info<< "Selecting twoPhaseSystem "
|
Info<< "Selecting twoPhaseSystem " << systemType << endl;
|
||||||
<< twoPhaseSystemType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(systemType);
|
||||||
dictionaryConstructorTablePtr_->find(twoPhaseSystemType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown twoPhaseSystemType type "
|
<< "Unknown twoPhaseSystem type "
|
||||||
<< twoPhaseSystemType << endl << endl
|
<< systemType << nl << nl
|
||||||
<< "Valid twoPhaseSystem types are : " << endl
|
<< "Valid twoPhaseSystem types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,20 +35,19 @@ Foam::aspectRatioModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word aspectRatioModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting aspectRatioModel for "
|
Info<< "Selecting aspectRatioModel for "
|
||||||
<< pair << ": " << aspectRatioModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(aspectRatioModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown aspectRatioModelType type "
|
<< "Unknown aspectRatioModel type "
|
||||||
<< aspectRatioModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid aspectRatioModel types are : " << endl
|
<< "Valid aspectRatioModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word dragModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting dragModel for "
|
Info<< "Selecting dragModel for "
|
||||||
<< pair << ": " << dragModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(dragModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown dragModelType type "
|
<< "Unknown dragModel type "
|
||||||
<< dragModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid dragModel types are : " << endl
|
<< "Valid dragModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word heatTransferModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting heatTransferModel for "
|
Info<< "Selecting heatTransferModel for "
|
||||||
<< pair << ": " << heatTransferModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(heatTransferModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown heatTransferModelType type "
|
<< "Unknown heatTransferModel type "
|
||||||
<< heatTransferModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid heatTransferModel types are : " << endl
|
<< "Valid heatTransferModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word liftModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting liftModel for "
|
Info<< "Selecting liftModel for "
|
||||||
<< pair << ": " << liftModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(liftModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown liftModelType type "
|
<< "Unknown liftModel type "
|
||||||
<< liftModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid liftModel types are : " << endl
|
<< "Valid liftModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,20 +35,19 @@ Foam::swarmCorrection::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word swarmCorrectionType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting swarmCorrection for "
|
Info<< "Selecting swarmCorrection for "
|
||||||
<< pair << ": " << swarmCorrectionType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(swarmCorrectionType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown swarmCorrectionType type "
|
<< "Unknown swarmCorrection type "
|
||||||
<< swarmCorrectionType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid swarmCorrection types are : " << endl
|
<< "Valid swarmCorrection types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,20 +35,19 @@ Foam::turbulentDispersionModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word turbulentDispersionModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting turbulentDispersionModel for "
|
Info<< "Selecting turbulentDispersionModel for "
|
||||||
<< pair << ": " << turbulentDispersionModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(turbulentDispersionModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown turbulentDispersionModelType type "
|
<< "Unknown turbulentDispersionModel type "
|
||||||
<< turbulentDispersionModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid turbulentDispersionModel types are : " << endl
|
<< "Valid turbulentDispersionModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::virtualMassModel> Foam::virtualMassModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word virtualMassModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting virtualMassModel for "
|
Info<< "Selecting virtualMassModel for "
|
||||||
<< pair << ": " << virtualMassModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(virtualMassModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown virtualMassModelType type "
|
<< "Unknown virtualMassModel type "
|
||||||
<< virtualMassModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid virtualMassModel types are : " << endl
|
<< "Valid virtualMassModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,20 +34,19 @@ Foam::autoPtr<Foam::wallLubricationModel> Foam::wallLubricationModel::New
|
|||||||
const phasePair& pair
|
const phasePair& pair
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word wallLubricationModelType(dict.lookup("type"));
|
const word modelType(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting wallLubricationModel for "
|
Info<< "Selecting wallLubricationModel for "
|
||||||
<< pair << ": " << wallLubricationModelType << endl;
|
<< pair << ": " << modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(wallLubricationModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown wallLubricationModelType type "
|
<< "Unknown wallLubricationModel type "
|
||||||
<< wallLubricationModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid wallLubricationModel types are : " << endl
|
<< "Valid wallLubricationModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,23 +33,20 @@ Foam::kineticTheoryModels::conductivityModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word conductivityModelType(dict.lookup("conductivityModel"));
|
const word modelType(dict.lookup("conductivityModel"));
|
||||||
|
|
||||||
Info<< "Selecting conductivityModel "
|
Info<< "Selecting conductivityModel " << modelType << endl;
|
||||||
<< conductivityModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(conductivityModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "conductivityModel::New(const dictionary&) : " << endl
|
<< "Unknown conductivityModel type "
|
||||||
<< " unknown conductivityModelType type "
|
<< modelType << nl << nl
|
||||||
<< conductivityModelType
|
<< "Valid conductivityModel types :" << endl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid conductivityModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<conductivityModel>(cstrIter()(dict));
|
return autoPtr<conductivityModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::frictionalStressModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word frictionalStressModelType(dict.lookup("frictionalStressModel"));
|
const word modelType(dict.lookup("frictionalStressModel"));
|
||||||
|
|
||||||
Info<< "Selecting frictionalStressModel "
|
Info<< "Selecting frictionalStressModel " << modelType << endl;
|
||||||
<< frictionalStressModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(frictionalStressModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "frictionalStressModel::New(const dictionary&) : " << endl
|
<< "Unknown frictionalStressModel type "
|
||||||
<< " unknown frictionalStressModelType type "
|
<< modelType << nl << nl
|
||||||
<< frictionalStressModelType
|
<< "Valid frictionalStressModelType types :" << endl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid frictionalStressModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<frictionalStressModel>(cstrIter()(dict));
|
return autoPtr<frictionalStressModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::granularPressureModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word granularPressureModelType(dict.lookup("granularPressureModel"));
|
const word modelType(dict.lookup("granularPressureModel"));
|
||||||
|
|
||||||
Info<< "Selecting granularPressureModel "
|
Info<< "Selecting granularPressureModel " << modelType << endl;
|
||||||
<< granularPressureModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(granularPressureModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "granularPressureModel::New(const dictionary&) : " << endl
|
<< "Unknown granularPressureModel type "
|
||||||
<< " unknown granularPressureModelType type "
|
<< modelType << nl << nl
|
||||||
<< granularPressureModelType
|
<< "Valid granularPressureModel types :" << nl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid granularPressureModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<granularPressureModel>(cstrIter()(dict));
|
return autoPtr<granularPressureModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,24 +33,20 @@ Foam::kineticTheoryModels::radialModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word radialModelType(dict.lookup("radialModel"));
|
const word modelType(dict.lookup("radialModel"));
|
||||||
|
|
||||||
Info<< "Selecting radialModel "
|
Info<< "Selecting radialModel " << modelType << endl;
|
||||||
<< radialModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(radialModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "radialModel::New(const dictionary&) : " << endl
|
<< "Unknown radialModel type "
|
||||||
<< " unknown radialModelType type "
|
<< modelType << nl << nl
|
||||||
<< radialModelType
|
<< "Valid radialModel types :" << endl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid radialModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<radialModel>(cstrIter()(dict));
|
return autoPtr<radialModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,23 +33,20 @@ Foam::kineticTheoryModels::viscosityModel::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word viscosityModelType(dict.lookup("viscosityModel"));
|
const word modelName(dict.lookup("viscosityModel"));
|
||||||
|
|
||||||
Info<< "Selecting viscosityModel "
|
Info<< "Selecting viscosityModel " << modelName << endl;
|
||||||
<< viscosityModelType << endl;
|
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelName);
|
||||||
dictionaryConstructorTablePtr_->find(viscosityModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalError
|
FatalErrorInFunction
|
||||||
<< "viscosityModel::New(const dictionary&) : " << endl
|
<< "Unknown viscosityModel type "
|
||||||
<< " unknown viscosityModelType type "
|
<< modelName << nl << nl
|
||||||
<< viscosityModelType
|
<< "Valid viscosityModel types :" << nl
|
||||||
<< ", constructor not in hash table" << endl << endl
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< " Valid viscosityModelType types are :" << endl;
|
<< exit(FatalError);
|
||||||
Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return autoPtr<viscosityModel>(cstrIter()(dict));
|
return autoPtr<viscosityModel>(cstrIter()(dict));
|
||||||
|
|||||||
@ -33,20 +33,19 @@ Foam::autoPtr<Foam::blendingMethod> Foam::blendingMethod::New
|
|||||||
const wordList& phaseNames
|
const wordList& phaseNames
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word blendingMethodType(dict.lookup("type"));
|
const word methodName(dict.lookup("type"));
|
||||||
|
|
||||||
Info<< "Selecting " << dict.dictName() << " blending method: "
|
Info<< "Selecting " << dict.dictName() << " blending method: "
|
||||||
<< blendingMethodType << endl;
|
<< methodName << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(methodName);
|
||||||
dictionaryConstructorTablePtr_->find(blendingMethodType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown blendingMethodType type "
|
<< "Unknown blendingMethod type "
|
||||||
<< blendingMethodType << endl << endl
|
<< methodName << nl << nl
|
||||||
<< "Valid blendingMethod types are : " << endl
|
<< "Valid blendingMethod types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,15 +51,14 @@ Foam::diameterModels::IATEsource::New
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(type);
|
||||||
dictionaryConstructorTablePtr_->find(type);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown IATE source type "
|
<< "Unknown IATE source type "
|
||||||
<< type << nl << nl
|
<< type << nl << nl
|
||||||
<< "Valid IATE source types : " << endl
|
<< "Valid IATE source types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,32 +33,28 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
|
|||||||
const phaseModel& phase
|
const phaseModel& phase
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
word diameterModelType
|
const word modelType(dict.lookup("diameterModel"));
|
||||||
(
|
|
||||||
dict.lookup("diameterModel")
|
|
||||||
);
|
|
||||||
|
|
||||||
Info << "Selecting diameterModel for phase "
|
Info << "Selecting diameterModel for phase "
|
||||||
<< phase.name()
|
<< phase.name()
|
||||||
<< ": "
|
<< ": "
|
||||||
<< diameterModelType << endl;
|
<< modelType << endl;
|
||||||
|
|
||||||
dictionaryConstructorTable::iterator cstrIter =
|
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);
|
||||||
dictionaryConstructorTablePtr_->find(diameterModelType);
|
|
||||||
|
|
||||||
if (!cstrIter.found())
|
if (!cstrIter.found())
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Unknown diameterModelType type "
|
<< "Unknown diameterModel type "
|
||||||
<< diameterModelType << endl << endl
|
<< modelType << nl << nl
|
||||||
<< "Valid diameterModel types are : " << endl
|
<< "Valid diameterModel types :" << endl
|
||||||
<< dictionaryConstructorTablePtr_->sortedToc()
|
<< dictionaryConstructorTablePtr_->sortedToc()
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
return cstrIter()
|
return cstrIter()
|
||||||
(
|
(
|
||||||
dict.optionalSubDict(diameterModelType + "Coeffs"),
|
dict.optionalSubDict(modelType + "Coeffs"),
|
||||||
phase
|
phase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,8 +31,7 @@ Description
|
|||||||
|
|
||||||
#include "CompactListList.H"
|
#include "CompactListList.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "OStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "IStringStream.H"
|
|
||||||
#include "faceList.H"
|
#include "faceList.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|||||||
@ -29,8 +29,7 @@ License
|
|||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "FlatOutput.H"
|
#include "FlatOutput.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "OStringStream.H"
|
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "wordList.H"
|
#include "wordList.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ See also
|
|||||||
#include "wordReList.H"
|
#include "wordReList.H"
|
||||||
|
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "scalar.H"
|
#include "scalar.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
|
|
||||||
|
|||||||
@ -25,8 +25,8 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "OStringStream.H"
|
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
#include "StringStream.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -35,15 +35,28 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Info<< "khkj" << endl;
|
Info<< "Begin test OStringStream" << endl;
|
||||||
|
|
||||||
OStringStream testStream;
|
OStringStream os;
|
||||||
testStream << "hello " << 1 << endl;
|
os << "output with some values " << 1 << " entry" << endl;
|
||||||
Info<< testStream.str() << endl;
|
|
||||||
testStream.rewind();
|
Info<< "contains:" << nl
|
||||||
Info<< testStream.str() << endl;
|
<< os.str() << endl;
|
||||||
testStream << "hello " << 2 << endl;
|
os.rewind();
|
||||||
Info<< testStream.str() << endl;
|
|
||||||
|
Info<< "after rewind:" << nl
|
||||||
|
<< os.str() << endl;
|
||||||
|
|
||||||
|
os << "####";
|
||||||
|
|
||||||
|
Info<< "overwrite with short string:" << nl
|
||||||
|
<< os.str() << endl;
|
||||||
|
|
||||||
|
os.reset();
|
||||||
|
os << "%%%% reset";
|
||||||
|
|
||||||
|
Info<< "after reset:" << nl
|
||||||
|
<< os.str() << endl;
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -54,7 +54,7 @@ int main(int argc, char *argv[])
|
|||||||
std::vector<bool> stlVector(n, true);
|
std::vector<bool> stlVector(n, true);
|
||||||
|
|
||||||
labelHashSet emptyHash;
|
labelHashSet emptyHash;
|
||||||
labelHashSet fullHash(1000);
|
labelHashSet fullHash(1024);
|
||||||
for (label i = 0; i < n; i++)
|
for (label i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
fullHash.insert(i);
|
fullHash.insert(i);
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Description
|
|||||||
#include "uLabel.H"
|
#include "uLabel.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "PackedBoolList.H"
|
#include "PackedBoolList.H"
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ Description
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "Polynomial.H"
|
#include "Polynomial.H"
|
||||||
#include "polynomialFunction.H"
|
#include "polynomialFunction.H"
|
||||||
#include "Random.H"
|
#include "Random.H"
|
||||||
|
|||||||
@ -25,8 +25,7 @@ License
|
|||||||
|
|
||||||
#include "StaticHashTable.H"
|
#include "StaticHashTable.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "OStringStream.H"
|
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ int main(int argc, char *argv[])
|
|||||||
dictionary dict;
|
dictionary dict;
|
||||||
dict.add(word("aa" + getEnv("WM_MPLIB") + "cc"), 16);
|
dict.add(word("aa" + getEnv("WM_MPLIB") + "cc"), 16);
|
||||||
|
|
||||||
string s("DDD${aa${WM_MPLIB}cc}EEE");
|
string s("DDD_${aa${WM_MPLIB}cc}_EEE");
|
||||||
stringOps::inplaceExpand(s, dict, true, false);
|
stringOps::inplaceExpand(s, dict, true, false);
|
||||||
Info<< "variable expansion:" << s << endl;
|
Info<< "variable expansion:" << s << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,8 +47,24 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
IOWarningInFunction(dict) << "warning 3" << endl;
|
IOWarningInFunction(dict) << "warning 3" << endl;
|
||||||
|
|
||||||
FatalErrorInFunction << "error 1" << endl;
|
FatalErrorInFunction
|
||||||
FatalErrorInFunction << "error 2" << exit(FatalError);
|
<< "This is an error from 1" << nl
|
||||||
|
<< "Explanation to follow:" << endl;
|
||||||
|
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Error 2"
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
catch (Foam::error& fErr)
|
||||||
|
{
|
||||||
|
Serr<< "Caught Foam error " << fErr << nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Error# 3"
|
||||||
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
catch (Foam::error& fErr)
|
catch (Foam::error& fErr)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
Test-externalCoupler.C
|
|
||||||
|
|
||||||
EXE = $(FOAM_USER_APPBIN)/Test-externalCoupler
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I$(LIB_SRC)/lumpedPointMotion/lnInclude
|
|
||||||
|
|
||||||
EXE_LIBS = \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-llumpedPointMotion
|
|
||||||
3
applications/test/externalFileCoupler/Make/files
Normal file
3
applications/test/externalFileCoupler/Make/files
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Test-externalFileCoupler.C
|
||||||
|
|
||||||
|
EXE = $(FOAM_USER_APPBIN)/Test-externalFileCoupler
|
||||||
5
applications/test/externalFileCoupler/Make/options
Normal file
5
applications/test/externalFileCoupler/Make/options
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
EXE_INC = \
|
||||||
|
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||||
|
|
||||||
|
EXE_LIBS = \
|
||||||
|
-lfiniteVolume
|
||||||
@ -22,14 +22,14 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Application
|
Application
|
||||||
Test-externalCoupler
|
Test-externalFileCoupler
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Test of master/slave communication etc.
|
Test of master/slave communication etc.
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "externalCoupler.H"
|
#include "externalFileCoupler.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const label maxCount = args.optionLookupOrDefault<label>("max", 1000);
|
const label maxCount = args.optionLookupOrDefault<label>("max", 1000);
|
||||||
|
|
||||||
externalCoupler coupler;
|
externalFileCoupler coupler;
|
||||||
|
|
||||||
if (args.optionFound("slave"))
|
if (args.optionFound("slave"))
|
||||||
{
|
{
|
||||||
@ -26,7 +26,6 @@ License
|
|||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "IStringStream.H"
|
|
||||||
#include "indexedOctree.H"
|
#include "indexedOctree.H"
|
||||||
#include "treeDataCell.H"
|
#include "treeDataCell.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
|
|||||||
@ -26,7 +26,6 @@ License
|
|||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "IStringStream.H"
|
|
||||||
#include "indexedOctree.H"
|
#include "indexedOctree.H"
|
||||||
#include "treeDataEdge.H"
|
#include "treeDataEdge.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
|
|||||||
@ -34,8 +34,6 @@ Description
|
|||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "OStringStream.H"
|
|
||||||
#include "IStringStream.H"
|
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,6 @@ Description
|
|||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
#include "volFields.H"
|
|
||||||
#include "mappedPolyPatch.H"
|
#include "mappedPolyPatch.H"
|
||||||
#include "mappedFixedValueFvPatchFields.H"
|
#include "mappedFixedValueFvPatchFields.H"
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ void testMapDistribute()
|
|||||||
List<Tuple2<label, List<scalar>>> complexData(100);
|
List<Tuple2<label, List<scalar>>> complexData(100);
|
||||||
forAll(complexData, i)
|
forAll(complexData, i)
|
||||||
{
|
{
|
||||||
complexData[i].first() = rndGen.integer(0, Pstream::nProcs()-1);
|
complexData[i].first() = rndGen.position(0, Pstream::nProcs()-1);
|
||||||
complexData[i].second().setSize(3);
|
complexData[i].second().setSize(3);
|
||||||
complexData[i].second()[0] = 1;
|
complexData[i].second()[0] = 1;
|
||||||
complexData[i].second()[1] = 2;
|
complexData[i].second()[1] = 2;
|
||||||
|
|||||||
@ -31,7 +31,6 @@ Description
|
|||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
|
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IStringStream.H"
|
|
||||||
#include "scalar.H"
|
#include "scalar.H"
|
||||||
#include "vector.H"
|
#include "vector.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
@ -49,31 +48,26 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
//Pout.prefix() = '[' + name(Pstream::myProcNo()) + "] ";
|
//Pout.prefix() = '[' + name(Pstream::myProcNo()) + "] ";
|
||||||
|
|
||||||
List<vector> list(IStringStream("1 ((0 1 2))")());
|
List<vector> list{{0, 1, 2}};
|
||||||
Info<< list << endl;
|
Info<< list << endl;
|
||||||
|
|
||||||
List<vector> list2
|
List<vector> list2
|
||||||
(
|
{
|
||||||
IStringStream
|
{0, 1, 2},
|
||||||
(
|
{3, 4, 5},
|
||||||
"(\
|
{3, 4, 5},
|
||||||
(0 1 2)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
{3, 4, 5},
|
||||||
(3 4 5)\
|
};
|
||||||
(3 4 5)\
|
|
||||||
(3 4 5)\
|
|
||||||
)"
|
|
||||||
)()
|
|
||||||
);
|
|
||||||
Pout<< list2 << endl;
|
Pout<< list2 << endl;
|
||||||
|
|
||||||
Info<< findIndex(list2, vector(3, 4, 5)) << endl;
|
Info<< findIndex(list2, vector(3, 4, 5)) << endl;
|
||||||
|
|||||||
@ -28,10 +28,8 @@ Description
|
|||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "label.H"
|
#include "label.H"
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "OStringStream.H"
|
|
||||||
#include "IStringStream.H"
|
|
||||||
#include "OFstream.H"
|
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
|
#include "OFstream.H"
|
||||||
#include "point.H"
|
#include "point.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
|
|||||||
@ -30,7 +30,7 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "OSHA1stream.H"
|
#include "OSHA1stream.H"
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
@ -96,7 +96,7 @@ int main(int argc, char * argv[])
|
|||||||
os << str;
|
os << str;
|
||||||
Info<< os.digest() << endl;
|
Info<< os.digest() << endl;
|
||||||
|
|
||||||
os.rewind();
|
os.reset();
|
||||||
os << "The quick brown fox jumps over the lazy dog";
|
os << "The quick brown fox jumps over the lazy dog";
|
||||||
Info<< os.digest() << endl;
|
Info<< os.digest() << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,6 @@ Description
|
|||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "nil.H"
|
#include "nil.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IStringStream.H"
|
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,8 +26,8 @@ Description
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "stringListOps.H"
|
#include "stringListOps.H"
|
||||||
#include "IStringStream.H"
|
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
#include "StringStream.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -37,22 +37,17 @@ using namespace Foam;
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
stringList strLst
|
stringList strLst
|
||||||
(
|
{
|
||||||
IStringStream
|
"hello",
|
||||||
(
|
"heello",
|
||||||
"("
|
"heeello",
|
||||||
"\"hello\""
|
"bye",
|
||||||
"\"heello\""
|
"bbye",
|
||||||
"\"heeello\""
|
"bbbye",
|
||||||
"\"bye\""
|
"okey",
|
||||||
"\"bbye\""
|
"okkey",
|
||||||
"\"bbbye\""
|
"okkkey",
|
||||||
"\"okey\""
|
};
|
||||||
"\"okkey\""
|
|
||||||
"\"okkkey\""
|
|
||||||
")"
|
|
||||||
)()
|
|
||||||
);
|
|
||||||
|
|
||||||
wordReList reLst(IStringStream("( okey \"[hy]e+.*\" )")());
|
wordReList reLst(IStringStream("( okey \"[hy]e+.*\" )")());
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ Description
|
|||||||
#include "IOobject.H"
|
#include "IOobject.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IFstream.H"
|
#include "IFstream.H"
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "cpuTime.H"
|
#include "cpuTime.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
@ -41,22 +41,28 @@ using namespace Foam;
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
argList::noBanner();
|
||||||
argList::noParallel();
|
argList::noParallel();
|
||||||
argList::validArgs.insert("string .. stringN");
|
argList::validArgs.insert("string .. stringN");
|
||||||
argList::addOption("file", "name");
|
argList::addOption("file", "name");
|
||||||
argList::addOption("repeat", "count");
|
argList::addOption("repeat", "count");
|
||||||
|
argList::addBoolOption("verbose", "report for each repeat");
|
||||||
|
|
||||||
argList args(argc, argv, false, true);
|
argList args(argc, argv, false, true);
|
||||||
|
|
||||||
const label repeat = args.optionLookupOrDefault<label>("repeat", 1);
|
const label repeat = args.optionLookupOrDefault<label>("repeat", 1);
|
||||||
|
|
||||||
|
const bool optVerbose = args.optionFound("verbose");
|
||||||
|
|
||||||
cpuTime timer;
|
cpuTime timer;
|
||||||
for (label count = 0; count < repeat; ++count)
|
for (label count = 0; count < repeat; ++count)
|
||||||
{
|
{
|
||||||
|
const bool verbose = (optVerbose || count == 0);
|
||||||
|
|
||||||
for (label argI=1; argI < args.size(); ++argI)
|
for (label argI=1; argI < args.size(); ++argI)
|
||||||
{
|
{
|
||||||
const string& rawArg = args[argI];
|
const string& rawArg = args[argI];
|
||||||
if (count == 0)
|
if (verbose)
|
||||||
{
|
{
|
||||||
Info<< "input string: " << rawArg << nl;
|
Info<< "input string: " << rawArg << nl;
|
||||||
}
|
}
|
||||||
@ -71,14 +77,15 @@ int main(int argc, char *argv[])
|
|||||||
// is.putback(ch);
|
// is.putback(ch);
|
||||||
int lookahead = is.peek();
|
int lookahead = is.peek();
|
||||||
|
|
||||||
if (count == 0)
|
if (verbose)
|
||||||
{
|
{
|
||||||
Info<< "token: " << tok.info();
|
Info<< "token: " << tok.info()
|
||||||
Info<< " lookahead: '" << char(lookahead) << "'" << endl;
|
<< " lookahead: '" << char(lookahead) << "'"
|
||||||
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count == 0)
|
if (verbose)
|
||||||
{
|
{
|
||||||
Info<< nl;
|
Info<< nl;
|
||||||
IOobject::writeDivider(Info);
|
IOobject::writeDivider(Info);
|
||||||
@ -89,31 +96,44 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "tokenized args " << repeat << " times in "
|
Info<< "tokenized args " << repeat << " times in "
|
||||||
<< timer.cpuTimeIncrement() << " s\n\n";
|
<< timer.cpuTimeIncrement() << " s\n\n";
|
||||||
|
|
||||||
if (args.optionFound("file"))
|
fileName inputFile;
|
||||||
|
if (args.optionReadIfPresent("file", inputFile))
|
||||||
{
|
{
|
||||||
|
IFstream is(inputFile);
|
||||||
|
|
||||||
for (label count = 0; count < repeat; ++count)
|
for (label count = 0; count < repeat; ++count)
|
||||||
{
|
{
|
||||||
IFstream is(args["file"]);
|
const bool verbose = (optVerbose || count == 0);
|
||||||
|
label nTokens = 0;
|
||||||
|
|
||||||
if (count == 0)
|
if (count)
|
||||||
{
|
{
|
||||||
Info<< "tokenizing file: " << args["file"] << nl;
|
is.rewind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< nl
|
||||||
|
<< "tokenizing file (pass #" << (count+1) << ") "
|
||||||
|
<< inputFile << nl
|
||||||
|
<< "state: " << is.info() << endl;
|
||||||
|
|
||||||
while (is.good())
|
while (is.good())
|
||||||
{
|
{
|
||||||
token tok(is);
|
token tok(is);
|
||||||
if (count == 0)
|
if (verbose)
|
||||||
{
|
{
|
||||||
Info<< "token: " << tok.info() << endl;
|
Info<< "token: " << tok.info() << endl;
|
||||||
}
|
}
|
||||||
|
++nTokens;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count == 0)
|
if (verbose)
|
||||||
{
|
{
|
||||||
Info<< nl;
|
Info<< nl;
|
||||||
IOobject::writeDivider(Info);
|
IOobject::writeDivider(Info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<<"pass #" << (count+1)
|
||||||
|
<< " extracted " << nTokens << " tokens" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "tokenized file " << repeat << " times in "
|
Info<< "tokenized file " << repeat << " times in "
|
||||||
|
|||||||
@ -30,7 +30,6 @@ Description
|
|||||||
#include "OSspecific.H"
|
#include "OSspecific.H"
|
||||||
|
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
#include "IStringStream.H"
|
|
||||||
#include "labelList.H"
|
#include "labelList.H"
|
||||||
#include "DynamicList.H"
|
#include "DynamicList.H"
|
||||||
#include "face.H"
|
#include "face.H"
|
||||||
|
|||||||
@ -46,7 +46,7 @@ Description
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include "scalar.H"
|
#include "scalar.H"
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
|
|
||||||
using namespace Foam;
|
using namespace Foam;
|
||||||
|
|
||||||
@ -271,7 +271,6 @@ elementType ^{space}"TYPE"{cspace}
|
|||||||
|
|
||||||
#include "fileName.H"
|
#include "fileName.H"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
using std::ifstream;
|
|
||||||
|
|
||||||
|
|
||||||
label findFace(const polyMesh& mesh, const face& f)
|
label findFace(const polyMesh& mesh, const face& f)
|
||||||
@ -318,8 +317,8 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
fileName ansysFile(args[1]);
|
const fileName ansysFile(args[1]);
|
||||||
ifstream ansysStream(ansysFile.c_str());
|
std::ifstream ansysStream(ansysFile);
|
||||||
|
|
||||||
if (!ansysStream)
|
if (!ansysStream)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
std::ifstream plot3dFile(args[1].c_str());
|
std::ifstream plot3dFile(args[1]);
|
||||||
|
|
||||||
string line;
|
string line;
|
||||||
std::getline(plot3dFile, line);
|
std::getline(plot3dFile, line);
|
||||||
@ -122,7 +122,7 @@ int main(int argc, char *argv[])
|
|||||||
fileName pointsFile(runTime.constantPath()/"points.tmp");
|
fileName pointsFile(runTime.constantPath()/"points.tmp");
|
||||||
OFstream pFile(pointsFile);
|
OFstream pFile(pointsFile);
|
||||||
|
|
||||||
scalar a(degToRad(0.1));
|
const scalar a = 0.1_deg;
|
||||||
tensor rotateZ =
|
tensor rotateZ =
|
||||||
tensor
|
tensor
|
||||||
(
|
(
|
||||||
|
|||||||
@ -35,7 +35,7 @@ Usage
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
- \param -ascii
|
- \par -ascii
|
||||||
Write in ASCII format instead of binary
|
Write in ASCII format instead of binary
|
||||||
|
|
||||||
- \par -check
|
- \par -check
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Description
|
|||||||
|
|
||||||
#include "argList.H"
|
#include "argList.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "IStringStream.H"
|
#include "StringStream.H"
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "emptyPolyPatch.H"
|
#include "emptyPolyPatch.H"
|
||||||
#include "wallPolyPatch.H"
|
#include "wallPolyPatch.H"
|
||||||
@ -906,7 +906,7 @@ int main(int argc, char *argv[])
|
|||||||
#include "createTime.H"
|
#include "createTime.H"
|
||||||
|
|
||||||
const fileName fluentFile = args[1];
|
const fileName fluentFile = args[1];
|
||||||
std::ifstream fluentStream(fluentFile.c_str());
|
std::ifstream fluentStream(fluentFile);
|
||||||
|
|
||||||
if (!fluentStream)
|
if (!fluentStream)
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user