adding les/ras cavitating solvers and barotropicCompressibilityModel library
This commit is contained in:
parent
48a1ef4bba
commit
75f6b64ffe
@ -1,8 +1,3 @@
|
||||
cavitatingFoam.C
|
||||
compressibilityModels/compressibilityModel/compressibilityModel.C
|
||||
compressibilityModels/compressibilityModel/newCompressibilityModel.C
|
||||
compressibilityModels/linear/linear.C
|
||||
compressibilityModels/Wallis/Wallis.C
|
||||
compressibilityModels/Chung/Chung.C
|
||||
|
||||
EXE = $(FOAM_APPBIN)/cavitatingFoam
|
||||
|
@ -1,6 +1,7 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-IcompressibilityModels/compressibilityModel
|
||||
-I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume
|
||||
-lfiniteVolume \
|
||||
-lbarotropicCompressibilityModel
|
||||
|
@ -30,7 +30,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "compressibilityModel.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -1,107 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModels::Chung
|
||||
|
||||
Description
|
||||
Chung compressibility model.
|
||||
|
||||
SourceFiles
|
||||
Chung.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Chung_H
|
||||
#define Chung_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Chung Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Chung
|
||||
:
|
||||
public compressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
dimensionedScalar psiv_;
|
||||
dimensionedScalar psil_;
|
||||
|
||||
dimensionedScalar rhovSat_;
|
||||
dimensionedScalar rholSat_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Chung");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- construct from components
|
||||
Chung
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~Chung()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct the Chung compressibility
|
||||
void correct();
|
||||
|
||||
//- Read transportProperties dictionary
|
||||
bool read(const dictionary& compressibilityProperties);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressibilityModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,86 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Wallis.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(Wallis, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, Wallis, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModels::Wallis::Wallis
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil")),
|
||||
rhovSat_(compressibilityProperties_.lookup("rhovSat")),
|
||||
rholSat_(compressibilityProperties_.lookup("rholSat"))
|
||||
{
|
||||
correct();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::compressibilityModels::Wallis::correct()
|
||||
{
|
||||
psi_ = (gamma_*rhovSat_ + (scalar(1) - gamma_)*rholSat_)
|
||||
*(gamma_*psiv_/rhovSat_ + (scalar(1) - gamma_)*psil_/rholSat_);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::compressibilityModels::Wallis::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
||||
compressibilityProperties_.lookup("rhovSat") >> rhovSat_;
|
||||
compressibilityProperties_.lookup("rholSat") >> rholSat_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,107 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModels::Wallis
|
||||
|
||||
Description
|
||||
Wallis compressibility model.
|
||||
|
||||
SourceFiles
|
||||
Wallis.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Wallis_H
|
||||
#define Wallis_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Wallis Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Wallis
|
||||
:
|
||||
public compressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
dimensionedScalar psiv_;
|
||||
dimensionedScalar psil_;
|
||||
|
||||
dimensionedScalar rhovSat_;
|
||||
dimensionedScalar rholSat_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Wallis");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- construct from components
|
||||
Wallis
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~Wallis()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct the Wallis compressibility
|
||||
void correct();
|
||||
|
||||
//- Read transportProperties dictionary
|
||||
bool read(const dictionary& compressibilityProperties);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressibilityModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,77 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
InClass
|
||||
compressibilityModel
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(compressibilityModel, 0);
|
||||
defineRunTimeSelectionTable(compressibilityModel, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModel::compressibilityModel
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityProperties_(compressibilityProperties),
|
||||
psi_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"psi",
|
||||
gamma.mesh().time().timeName(),
|
||||
gamma.mesh()
|
||||
),
|
||||
gamma.mesh(),
|
||||
dimensionedScalar("psi", dimensionSet(0, -2, 2, 0, 0), 0)
|
||||
),
|
||||
gamma_(gamma)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::compressibilityModel::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityProperties_ = compressibilityProperties;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,67 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::compressibilityModel> Foam::compressibilityModel::New
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
{
|
||||
word compressibilityModelTypeName
|
||||
(
|
||||
compressibilityProperties.lookup("compressibilityModel")
|
||||
);
|
||||
|
||||
Info<< "Selecting compressibility model "
|
||||
<< compressibilityModelTypeName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(compressibilityModelTypeName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"compressibilityModel::New(const volScalarField&)"
|
||||
) << "Unknown compressibilityModel type "
|
||||
<< compressibilityModelTypeName << endl << endl
|
||||
<< "Valid compressibilityModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<compressibilityModel>
|
||||
(
|
||||
cstrIter()(compressibilityProperties, gamma)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,82 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "linear.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(linear, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, linear, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModels::linear::linear
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil"))
|
||||
{
|
||||
correct();
|
||||
psi_.oldTime();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::compressibilityModels::linear::correct()
|
||||
{
|
||||
psi_ = gamma_*psiv_ + (scalar(1) - gamma_)*psil_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::compressibilityModels::linear::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -39,12 +39,13 @@
|
||||
);
|
||||
gamma.oldTime();
|
||||
|
||||
Info<< "Creating compressibilityModel\n" << endl;
|
||||
autoPtr<compressibilityModel> psiModel = compressibilityModel::New
|
||||
(
|
||||
thermodynamicProperties,
|
||||
gamma
|
||||
);
|
||||
Info<< "Creating barotropicompressibilityModel\n" << endl;
|
||||
autoPtr<barotropicCompressibilityModel> psiModel =
|
||||
barotropicCompressibilityModel::New
|
||||
(
|
||||
thermodynamicProperties,
|
||||
gamma
|
||||
);
|
||||
|
||||
const volScalarField& psi = psiModel->psi();
|
||||
|
||||
|
@ -1,10 +1,5 @@
|
||||
lesCavitatingFoam.C
|
||||
compressibilityModels/compressibilityModel/compressibilityModel.C
|
||||
compressibilityModels/compressibilityModel/newCompressibilityModel.C
|
||||
compressibilityModels/linear/linear.C
|
||||
compressibilityModels/Wallis/Wallis.C
|
||||
compressibilityModels/Chung/Chung.C
|
||||
|
||||
devOneEqEddy/devOneEqEddy.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/lesCavitatingFoam
|
||||
EXE = $(FOAM_APPBIN)/lesCavitatingFoam
|
||||
|
@ -6,10 +6,11 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/LESmodels \
|
||||
-I$(LIB_SRC)/LESmodels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/LESmodels/LESdeltas/lnInclude \
|
||||
-IcompressibilityModels/compressibilityModel
|
||||
-I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lincompressibleTransportModels \
|
||||
-lincompressibleLESmodels \
|
||||
-lfiniteVolume
|
||||
-lfiniteVolume \
|
||||
-lbarotropicCompressibilityModel
|
||||
|
||||
|
@ -1,95 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Chung.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(Chung, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, Chung, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModels::Chung::Chung
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil")),
|
||||
rhovSat_(compressibilityProperties_.lookup("rhovSat")),
|
||||
rholSat_(compressibilityProperties_.lookup("rholSat"))
|
||||
{
|
||||
correct();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::compressibilityModels::Chung::correct()
|
||||
{
|
||||
volScalarField sfa = sqrt
|
||||
(
|
||||
(rhovSat_/psiv_)
|
||||
/((scalar(1) - gamma_)*rhovSat_/psiv_ + gamma_*rholSat_/psil_)
|
||||
);
|
||||
|
||||
psi_ = sqr
|
||||
(
|
||||
((scalar(1) - gamma_)/sqrt(psiv_) + gamma_*sfa/sqrt(psil_))
|
||||
*sqrt(psiv_*psil_)/sfa
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::compressibilityModels::Chung::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
||||
compressibilityProperties_.lookup("rhovSat") >> rhovSat_;
|
||||
compressibilityProperties_.lookup("rholSat") >> rholSat_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,86 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Wallis.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(Wallis, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, Wallis, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModels::Wallis::Wallis
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil")),
|
||||
rhovSat_(compressibilityProperties_.lookup("rhovSat")),
|
||||
rholSat_(compressibilityProperties_.lookup("rholSat"))
|
||||
{
|
||||
correct();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::compressibilityModels::Wallis::correct()
|
||||
{
|
||||
psi_ = (gamma_*rhovSat_ + (scalar(1) - gamma_)*rholSat_)
|
||||
*(gamma_*psiv_/rhovSat_ + (scalar(1) - gamma_)*psil_/rholSat_);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::compressibilityModels::Wallis::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
||||
compressibilityProperties_.lookup("rhovSat") >> rhovSat_;
|
||||
compressibilityProperties_.lookup("rholSat") >> rholSat_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,107 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModels::Wallis
|
||||
|
||||
Description
|
||||
Wallis compressibility model.
|
||||
|
||||
SourceFiles
|
||||
Wallis.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Wallis_H
|
||||
#define Wallis_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Wallis Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Wallis
|
||||
:
|
||||
public compressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
dimensionedScalar psiv_;
|
||||
dimensionedScalar psil_;
|
||||
|
||||
dimensionedScalar rhovSat_;
|
||||
dimensionedScalar rholSat_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Wallis");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- construct from components
|
||||
Wallis
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~Wallis()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct the Wallis compressibility
|
||||
void correct();
|
||||
|
||||
//- Read transportProperties dictionary
|
||||
bool read(const dictionary& compressibilityProperties);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressibilityModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,154 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
compressibilityModel.C
|
||||
newCompressibilityModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef compressibilityModel_H
|
||||
#define compressibilityModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "typeInfo.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "volFields.H"
|
||||
#include "dimensionedScalar.H"
|
||||
#include "autoPtr.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class compressibilityModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class compressibilityModel
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
dictionary compressibilityProperties_;
|
||||
|
||||
volScalarField psi_;
|
||||
const volScalarField& gamma_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
compressibilityModel(const compressibilityModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const compressibilityModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressibilityModel");
|
||||
|
||||
|
||||
// Declare run-time constructor selection table
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
compressibilityModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
),
|
||||
(compressibilityProperties, gamma)
|
||||
);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Return a reference to the selected compressibility model
|
||||
static autoPtr<compressibilityModel> New
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
compressibilityModel
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~compressibilityModel()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the phase transport properties dictionary
|
||||
const dictionary& compressibilityProperties() const
|
||||
{
|
||||
return compressibilityProperties_;
|
||||
}
|
||||
|
||||
//- Return the compressibility
|
||||
const volScalarField& psi() const
|
||||
{
|
||||
return psi_;
|
||||
}
|
||||
|
||||
//- Correct the compressibility
|
||||
virtual void correct() = 0;
|
||||
|
||||
//- Read compressibilityProperties dictionary
|
||||
virtual bool read(const dictionary& compressibilityProperties) = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,67 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::compressibilityModel> Foam::compressibilityModel::New
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
{
|
||||
word compressibilityModelTypeName
|
||||
(
|
||||
compressibilityProperties.lookup("compressibilityModel")
|
||||
);
|
||||
|
||||
Info<< "Selecting compressibility model "
|
||||
<< compressibilityModelTypeName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(compressibilityModelTypeName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"compressibilityModel::New(const volScalarField&)"
|
||||
) << "Unknown compressibilityModel type "
|
||||
<< compressibilityModelTypeName << endl << endl
|
||||
<< "Valid compressibilityModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<compressibilityModel>
|
||||
(
|
||||
cstrIter()(compressibilityProperties, gamma)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,82 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "linear.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(linear, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, linear, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModels::linear::linear
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil"))
|
||||
{
|
||||
correct();
|
||||
psi_.oldTime();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::compressibilityModels::linear::correct()
|
||||
{
|
||||
psi_ = gamma_*psiv_ + (scalar(1) - gamma_)*psil_;
|
||||
}
|
||||
|
||||
|
||||
bool Foam::compressibilityModels::linear::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,104 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModels::linear
|
||||
|
||||
Description
|
||||
linear compressibility model.
|
||||
|
||||
SourceFiles
|
||||
linear.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef linear_H
|
||||
#define linear_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class linear Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class linear
|
||||
:
|
||||
public compressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
dimensionedScalar psiv_;
|
||||
dimensionedScalar psil_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("linear");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- construct from components
|
||||
linear
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~linear()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct the linear compressibility
|
||||
void correct();
|
||||
|
||||
//- Read transportProperties dictionary
|
||||
bool read(const dictionary& compressibilityProperties);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressibilityModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -40,11 +40,12 @@
|
||||
gamma.oldTime();
|
||||
|
||||
Info<< "Creating compressibilityModel\n" << endl;
|
||||
autoPtr<compressibilityModel> psiModel = compressibilityModel::New
|
||||
(
|
||||
thermodynamicProperties,
|
||||
gamma
|
||||
);
|
||||
autoPtr<barotropicCompressibilityModel> psiModel =
|
||||
barotropicCompressibilityModel::New
|
||||
(
|
||||
thermodynamicProperties,
|
||||
gamma
|
||||
);
|
||||
|
||||
const volScalarField& psi = psiModel->psi();
|
||||
|
||||
|
@ -30,7 +30,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "compressibilityModel.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
#include "twoPhaseMixture.H"
|
||||
#include "incompressible/LESmodel/LESmodel.H"
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
rasCavitatingFoam.C
|
||||
compressibilityModels/compressibilityModel/compressibilityModel.C
|
||||
compressibilityModels/compressibilityModel/newCompressibilityModel.C
|
||||
compressibilityModels/linear/linear.C
|
||||
compressibilityModels/Wallis/Wallis.C
|
||||
compressibilityModels/Chung/Chung.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/rasCavitatingFoam
|
||||
EXE = $(FOAM_APPBIN)/rasCavitatingFoam
|
||||
|
@ -4,10 +4,11 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-IcompressibilityModels/compressibilityModel
|
||||
-I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lincompressibleTransportModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lfiniteVolume
|
||||
-lfiniteVolume \
|
||||
-lbarotropicCompressibilityModel
|
||||
|
||||
|
@ -1,95 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "Chung.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(Chung, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, Chung, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModels::Chung::Chung
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil")),
|
||||
rhovSat_(compressibilityProperties_.lookup("rhovSat")),
|
||||
rholSat_(compressibilityProperties_.lookup("rholSat"))
|
||||
{
|
||||
correct();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::compressibilityModels::Chung::correct()
|
||||
{
|
||||
volScalarField sfa = sqrt
|
||||
(
|
||||
(rhovSat_/psiv_)
|
||||
/((scalar(1) - gamma_)*rhovSat_/psiv_ + gamma_*rholSat_/psil_)
|
||||
);
|
||||
|
||||
psi_ = sqr
|
||||
(
|
||||
((scalar(1) - gamma_)/sqrt(psiv_) + gamma_*sfa/sqrt(psil_))
|
||||
*sqrt(psiv_*psil_)/sfa
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
bool Foam::compressibilityModels::Chung::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
||||
compressibilityProperties_.lookup("rhovSat") >> rhovSat_;
|
||||
compressibilityProperties_.lookup("rholSat") >> rholSat_;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,107 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModels::Chung
|
||||
|
||||
Description
|
||||
Chung compressibility model.
|
||||
|
||||
SourceFiles
|
||||
Chung.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Chung_H
|
||||
#define Chung_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class Chung Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class Chung
|
||||
:
|
||||
public compressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
dimensionedScalar psiv_;
|
||||
dimensionedScalar psil_;
|
||||
|
||||
dimensionedScalar rhovSat_;
|
||||
dimensionedScalar rholSat_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("Chung");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- construct from components
|
||||
Chung
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~Chung()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct the Chung compressibility
|
||||
void correct();
|
||||
|
||||
//- Read transportProperties dictionary
|
||||
bool read(const dictionary& compressibilityProperties);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressibilityModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,77 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
InClass
|
||||
compressibilityModel
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(compressibilityModel, 0);
|
||||
defineRunTimeSelectionTable(compressibilityModel, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModel::compressibilityModel
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityProperties_(compressibilityProperties),
|
||||
psi_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"psi",
|
||||
gamma.mesh().time().timeName(),
|
||||
gamma.mesh()
|
||||
),
|
||||
gamma.mesh(),
|
||||
dimensionedScalar("psi", dimensionSet(0, -2, 2, 0, 0), 0)
|
||||
),
|
||||
gamma_(gamma)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::compressibilityModel::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityProperties_ = compressibilityProperties;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -1,154 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
compressibilityModel.C
|
||||
newCompressibilityModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef compressibilityModel_H
|
||||
#define compressibilityModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "typeInfo.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
#include "volFields.H"
|
||||
#include "dimensionedScalar.H"
|
||||
#include "autoPtr.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class compressibilityModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class compressibilityModel
|
||||
{
|
||||
|
||||
protected:
|
||||
|
||||
// Protected data
|
||||
|
||||
dictionary compressibilityProperties_;
|
||||
|
||||
volScalarField psi_;
|
||||
const volScalarField& gamma_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
compressibilityModel(const compressibilityModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const compressibilityModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressibilityModel");
|
||||
|
||||
|
||||
// Declare run-time constructor selection table
|
||||
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
compressibilityModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
),
|
||||
(compressibilityProperties, gamma)
|
||||
);
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
//- Return a reference to the selected compressibility model
|
||||
static autoPtr<compressibilityModel> New
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
compressibilityModel
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~compressibilityModel()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return the phase transport properties dictionary
|
||||
const dictionary& compressibilityProperties() const
|
||||
{
|
||||
return compressibilityProperties_;
|
||||
}
|
||||
|
||||
//- Return the compressibility
|
||||
const volScalarField& psi() const
|
||||
{
|
||||
return psi_;
|
||||
}
|
||||
|
||||
//- Correct the compressibility
|
||||
virtual void correct() = 0;
|
||||
|
||||
//- Read compressibilityProperties dictionary
|
||||
virtual bool read(const dictionary& compressibilityProperties) = 0;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -1,104 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation; either version 2 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModels::linear
|
||||
|
||||
Description
|
||||
linear compressibility model.
|
||||
|
||||
SourceFiles
|
||||
linear.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef linear_H
|
||||
#define linear_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace compressibilityModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class linear Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class linear
|
||||
:
|
||||
public compressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
dimensionedScalar psiv_;
|
||||
dimensionedScalar psil_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("linear");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- construct from components
|
||||
linear
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
);
|
||||
|
||||
|
||||
// Destructor
|
||||
|
||||
~linear()
|
||||
{}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Correct the linear compressibility
|
||||
void correct();
|
||||
|
||||
//- Read transportProperties dictionary
|
||||
bool read(const dictionary& compressibilityProperties);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace compressibilityModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
@ -40,11 +40,12 @@
|
||||
gamma.oldTime();
|
||||
|
||||
Info<< "Creating compressibilityModel\n" << endl;
|
||||
autoPtr<compressibilityModel> psiModel = compressibilityModel::New
|
||||
(
|
||||
thermodynamicProperties,
|
||||
gamma
|
||||
);
|
||||
autoPtr<barotropicCompressibilityModel> psiModel =
|
||||
barotropicCompressibilityModel::New
|
||||
(
|
||||
thermodynamicProperties,
|
||||
gamma
|
||||
);
|
||||
|
||||
const volScalarField& psi = psiModel->psi();
|
||||
|
||||
|
@ -30,7 +30,7 @@ Description
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "compressibilityModel.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
#include "twoPhaseMixture.H"
|
||||
#include "incompressible/turbulenceModel/turbulenceModel.H"
|
||||
|
||||
|
@ -14,4 +14,5 @@ wmake libso laminarFlameSpeed
|
||||
wmake libso chemistryModel
|
||||
wmake libso pdfs
|
||||
wmake libso radiation
|
||||
wmake libso barotropicCompressibilityModel
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(Chung, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, Chung, dictionary);
|
||||
addToRunTimeSelectionTable(barotropicCompressibilityModel, Chung, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ Foam::compressibilityModels::Chung::Chung
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
barotropicCompressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil")),
|
||||
rhovSat_(compressibilityProperties_.lookup("rhovSat")),
|
||||
@ -81,7 +81,7 @@ bool Foam::compressibilityModels::Chung::read
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
barotropicCompressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
@ -36,7 +36,7 @@ SourceFiles
|
||||
#ifndef Chung_H
|
||||
#define Chung_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -52,7 +52,7 @@ namespace compressibilityModels
|
||||
|
||||
class Chung
|
||||
:
|
||||
public compressibilityModel
|
||||
public barotropicCompressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
@ -0,0 +1,7 @@
|
||||
barotropicCompressibilityModel/barotropicCompressibilityModel.C
|
||||
barotropicCompressibilityModel/newBarotropicCompressibilityModel.C
|
||||
linear/linear.C
|
||||
Wallis/Wallis.C
|
||||
Chung/Chung.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libbarotropicCompressibilityModel
|
@ -0,0 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume
|
@ -35,7 +35,7 @@ namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(Wallis, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, Wallis, dictionary);
|
||||
addToRunTimeSelectionTable(barotropicCompressibilityModel, Wallis, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ Foam::compressibilityModels::Wallis::Wallis
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
barotropicCompressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil")),
|
||||
rhovSat_(compressibilityProperties_.lookup("rhovSat")),
|
||||
@ -72,7 +72,7 @@ bool Foam::compressibilityModels::Wallis::read
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
barotropicCompressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
@ -36,7 +36,7 @@ SourceFiles
|
||||
#ifndef Wallis_H
|
||||
#define Wallis_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -52,7 +52,7 @@ namespace compressibilityModels
|
||||
|
||||
class Wallis
|
||||
:
|
||||
public compressibilityModel
|
||||
public barotropicCompressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
@ -23,23 +23,23 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
InClass
|
||||
compressibilityModel
|
||||
barotropicCompressibilityModel
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTypeNameAndDebug(compressibilityModel, 0);
|
||||
defineRunTimeSelectionTable(compressibilityModel, dictionary);
|
||||
defineTypeNameAndDebug(barotropicCompressibilityModel, 0);
|
||||
defineRunTimeSelectionTable(barotropicCompressibilityModel, dictionary);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::compressibilityModel::compressibilityModel
|
||||
Foam::barotropicCompressibilityModel::barotropicCompressibilityModel
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
@ -63,7 +63,7 @@ Foam::compressibilityModel::compressibilityModel
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::compressibilityModel::read
|
||||
bool Foam::barotropicCompressibilityModel::read
|
||||
(
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
@ -23,18 +23,18 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Class
|
||||
Foam::compressibilityModel
|
||||
Foam::barotropicCompressibilityModel
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
compressibilityModel.C
|
||||
newCompressibilityModel.C
|
||||
barotropicCompressibilityModel.C
|
||||
newbarotropicCompressibilityModel.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef compressibilityModel_H
|
||||
#define compressibilityModel_H
|
||||
#ifndef barotropicCompressibilityModel_H
|
||||
#define barotropicCompressibilityModel_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "typeInfo.H"
|
||||
@ -49,10 +49,10 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class compressibilityModel Declaration
|
||||
Class barotropicCompressibilityModel Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class compressibilityModel
|
||||
class barotropicCompressibilityModel
|
||||
{
|
||||
|
||||
protected:
|
||||
@ -68,16 +68,16 @@ protected:
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow copy construct
|
||||
compressibilityModel(const compressibilityModel&);
|
||||
barotropicCompressibilityModel(const barotropicCompressibilityModel&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const compressibilityModel&);
|
||||
void operator=(const barotropicCompressibilityModel&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("compressibilityModel");
|
||||
TypeName("barotropicCompressibilityModel");
|
||||
|
||||
|
||||
// Declare run-time constructor selection table
|
||||
@ -85,7 +85,7 @@ public:
|
||||
declareRunTimeSelectionTable
|
||||
(
|
||||
autoPtr,
|
||||
compressibilityModel,
|
||||
barotropicCompressibilityModel,
|
||||
dictionary,
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
@ -98,7 +98,7 @@ public:
|
||||
// Selectors
|
||||
|
||||
//- Return a reference to the selected compressibility model
|
||||
static autoPtr<compressibilityModel> New
|
||||
static autoPtr<barotropicCompressibilityModel> New
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
@ -108,7 +108,7 @@ public:
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
compressibilityModel
|
||||
barotropicCompressibilityModel
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
@ -117,7 +117,7 @@ public:
|
||||
|
||||
// Destructor
|
||||
|
||||
virtual ~compressibilityModel()
|
||||
virtual ~barotropicCompressibilityModel()
|
||||
{}
|
||||
|
||||
|
@ -24,40 +24,41 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::autoPtr<Foam::compressibilityModel> Foam::compressibilityModel::New
|
||||
Foam::autoPtr<Foam::barotropicCompressibilityModel>
|
||||
Foam::barotropicCompressibilityModel::New
|
||||
(
|
||||
const dictionary& compressibilityProperties,
|
||||
const volScalarField& gamma
|
||||
)
|
||||
{
|
||||
word compressibilityModelTypeName
|
||||
word bcModelTypeName
|
||||
(
|
||||
compressibilityProperties.lookup("compressibilityModel")
|
||||
compressibilityProperties.lookup("barotropicCompressibilityModel")
|
||||
);
|
||||
|
||||
Info<< "Selecting compressibility model "
|
||||
<< compressibilityModelTypeName << endl;
|
||||
<< bcModelTypeName << endl;
|
||||
|
||||
dictionaryConstructorTable::iterator cstrIter =
|
||||
dictionaryConstructorTablePtr_->find(compressibilityModelTypeName);
|
||||
dictionaryConstructorTablePtr_->find(bcModelTypeName);
|
||||
|
||||
if (cstrIter == dictionaryConstructorTablePtr_->end())
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"compressibilityModel::New(const volScalarField&)"
|
||||
) << "Unknown compressibilityModel type "
|
||||
<< compressibilityModelTypeName << endl << endl
|
||||
<< "Valid compressibilityModels are : " << endl
|
||||
"barotropicCompressibilityModel::New(const volScalarField&)"
|
||||
) << "Unknown barotropicCompressibilityModel type "
|
||||
<< bcModelTypeName << endl << endl
|
||||
<< "Valid barotropicCompressibilityModels are : " << endl
|
||||
<< dictionaryConstructorTablePtr_->toc()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
return autoPtr<compressibilityModel>
|
||||
return autoPtr<barotropicCompressibilityModel>
|
||||
(
|
||||
cstrIter()(compressibilityProperties, gamma)
|
||||
);
|
@ -35,7 +35,7 @@ namespace compressibilityModels
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(linear, 0);
|
||||
addToRunTimeSelectionTable(compressibilityModel, linear, dictionary);
|
||||
addToRunTimeSelectionTable(barotropicCompressibilityModel, linear, dictionary);
|
||||
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ Foam::compressibilityModels::linear::linear
|
||||
const volScalarField& gamma
|
||||
)
|
||||
:
|
||||
compressibilityModel(compressibilityProperties, gamma),
|
||||
barotropicCompressibilityModel(compressibilityProperties, gamma),
|
||||
psiv_(compressibilityProperties_.lookup("psiv")),
|
||||
psil_(compressibilityProperties_.lookup("psil"))
|
||||
{
|
||||
@ -70,7 +70,7 @@ bool Foam::compressibilityModels::linear::read
|
||||
const dictionary& compressibilityProperties
|
||||
)
|
||||
{
|
||||
compressibilityModel::read(compressibilityProperties);
|
||||
barotropicCompressibilityModel::read(compressibilityProperties);
|
||||
|
||||
compressibilityProperties_.lookup("psiv") >> psiv_;
|
||||
compressibilityProperties_.lookup("psil") >> psil_;
|
@ -36,7 +36,7 @@ SourceFiles
|
||||
#ifndef linear_H
|
||||
#define linear_H
|
||||
|
||||
#include "compressibilityModel.H"
|
||||
#include "barotropicCompressibilityModel.H"
|
||||
#include "dimensionedScalar.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -52,7 +52,7 @@ namespace compressibilityModels
|
||||
|
||||
class linear
|
||||
:
|
||||
public compressibilityModel
|
||||
public barotropicCompressibilityModel
|
||||
{
|
||||
// Private data
|
||||
|
Loading…
Reference in New Issue
Block a user