solvers::film: new solver module to simulate thermal liquid films and CHT

Class
    Foam::solvers::film

Description
    Solver module for flow of compressible liquid films

    Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
    pseudo-transient and steady simulations.

    Optional fvModels and fvConstraints are provided to enhance the simulation
    in many ways including adding various sources, Lagrangian particles,
    radiation, surface film etc. and constraining or limiting the solution.

solvers::film is derived from solvers::isothermalFilm adding an energy equation
and temperature update with support for heat transfer to the wall using the
standard ThermophysicalTransportModels library utilising the filmWall patch type
or mappedFilmWall for CHT heat transfer to the adjacent solid region.  A huge
advantage of this consistency with the rest of OpenFOAM is that the standard
thermal coupled boundary conditions can be used without modification, e.g.
temperatureCoupled.

Two variants of the rivuletPanel tutorial case are provided,
tutorials/modules/film/rivuletPanel demonstrates heat transfer to a fixed
temperature wall and tutorials/modules/CHT/rivuletPanel demonstrates conjugate
heat transfer to a thin aluminium panel simulated in a region using the
solvers::solid solver executed with solvers::film using foamMultiRun.

More functionality will be added through the power of fvModels.
This commit is contained in:
Henry Weller
2023-02-28 19:33:12 +00:00
parent dcbd54c131
commit 796cfb3b3a
34 changed files with 1418 additions and 0 deletions

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
wclean libso filmThermophysicalTransportModels
wclean
#------------------------------------------------------------------------------

View File

@ -0,0 +1,10 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
wmake $targetType filmThermophysicalTransportModels
wmake $targetType
#------------------------------------------------------------------------------

View File

@ -0,0 +1,4 @@
film.C
thermophysicalPredictor.C
LIB = $(FOAM_LIBBIN)/libfilm

View File

@ -0,0 +1,23 @@
EXE_INC = \
-I$(FOAM_SOLVERS)/modules/isothermalFilm/lnInclude \
-IfilmThermophysicalTransportModels/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/fluid/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lisothermalFilm \
-lfilmThermophysicalTransportModels \
-lcoupledThermophysicalTransportModels \
-lmomentumTransportModels \
-lcompressibleMomentumTransportModels \
-lfiniteVolume \
-lmeshTools \
-lsampling \
-lfvModels \
-lfvConstraints

View File

@ -0,0 +1,90 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "film.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
namespace solvers
{
defineTypeNameAndDebug(film, 0);
addToRunTimeSelectionTable(solver, film, fvMesh);
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::solvers::film::film(fvMesh& mesh)
:
isothermalFilm(mesh),
thermophysicalTransport
(
filmThermophysicalTransportModel::New
(
momentumTransport(),
thermo
)
)
{
thermo.validate(type(), "h", "e");
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::solvers::film::~film()
{}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::solvers::film::prePredictor()
{
isothermalFilm::prePredictor();
if (pimple.predictTransport())
{
thermophysicalTransport->predict();
}
}
void Foam::solvers::film::postCorrector()
{
isothermalFilm::postCorrector();
if (pimple.correctTransport())
{
thermophysicalTransport->correct();
}
}
// ************************************************************************* //

View File

@ -0,0 +1,123 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::solvers::film
Description
Solver module for flow of compressible liquid films
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
pseudo-transient and steady simulations.
Optional fvModels and fvConstraints are provided to enhance the simulation
in many ways including adding various sources, Lagrangian particles,
radiation, surface film etc. and constraining or limiting the solution.
SourceFiles
film.C
See also
Foam::solvers::isothermalFilm
\*---------------------------------------------------------------------------*/
#ifndef film_H
#define film_H
#include "isothermalFilm.H"
#include "filmThermophysicalTransportModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace solvers
{
/*---------------------------------------------------------------------------*\
Class film Declaration
\*---------------------------------------------------------------------------*/
class film
:
public isothermalFilm
{
protected:
// Thermophysical transport
autoPtr<filmThermophysicalTransportModel> thermophysicalTransport;
public:
//- Runtime type information
TypeName("film");
// Constructors
//- Construct from region mesh
film(fvMesh& mesh);
//- Disallow default bitwise copy construction
film(const film&) = delete;
//- Destructor
virtual ~film();
// Member Functions
//- Called at the start of the PIMPLE loop
virtual void prePredictor();
//- Construct and solve the energy equation,
// convert to temperature
// and update thermophysical and transport properties
virtual void thermophysicalPredictor();
//- Correct the momentum and thermophysical transport modelling
virtual void postCorrector();
// Member Operators
//- Disallow default bitwise assignment
void operator=(const film&) = delete;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace solvers
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,3 @@
filmThermophysicalTransportModels.C
LIB = $(FOAM_LIBBIN)/libfilmThermophysicalTransportModels

View File

@ -0,0 +1,21 @@
EXE_INC = \
-I$(FOAM_SOLVERS)/modules/isothermalFilm/filmCompressibleMomentumTransportModels/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/thermophysicalTransportModel/lnInclude \
-I$(LIB_SRC)/ThermophysicalTransportModels/fluid/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
LIB_LIBS = \
-lfluidThermoThermophysicalTransportModels \
-lfluidThermophysicalModels \
-lmomentumTransportModels \
-lfilmCompressibleMomentumTransportModels \
-lspecie \
-lfiniteVolume \
-lmeshTools

View File

@ -0,0 +1,54 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::filmThermophysicalTransportModel
Description
Typedefs for film thermophysical transport models
\*---------------------------------------------------------------------------*/
#ifndef filmThermophysicalTransportModel_H
#define filmThermophysicalTransportModel_H
#include "fluidThermo.H"
#include "PhaseThermophysicalTransportModel.H"
#include "filmCompressibleMomentumTransportModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef PhaseThermophysicalTransportModel
<
filmCompressibleMomentumTransportModel,
fluidThermo
> filmThermophysicalTransportModel;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,57 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "filmThermophysicalTransportModels.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeThermophysicalTransportModelTable
(
PhaseThermophysicalTransportModel,
filmCompressibleMomentumTransportModel,
fluidThermo
);
makeThermophysicalTransportModelTableType
(
PhaseThermophysicalTransportModel,
filmCompressibleMomentumTransportModel,
fluidThermo,
laminar
);
// -------------------------------------------------------------------------- //
// Laminar models
// -------------------------------------------------------------------------- //
#include "Fourier.H"
makeLaminarThermophysicalTransportModel(Fourier);
#include "unityLewisFourier.H"
makeLaminarThermophysicalTransportModel(unityLewisFourier);
// ************************************************************************* //

View File

@ -0,0 +1,58 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "filmThermophysicalTransportModel.H"
#include "laminarThermophysicalTransportModel.H"
#include "makeThermophysicalTransportModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeThermophysicalTransportModelBaseType
(
PhaseThermophysicalTransportModel,
filmCompressibleMomentumTransportModel,
fluidThermo
);
makeThermophysicalTransportModelType
(
PhaseThermophysicalTransportModel,
filmCompressibleMomentumTransportModel,
fluidThermo,
laminar
);
#define makeLaminarThermophysicalTransportModel(Type) \
makeThermophysicalTransportModel \
( \
PhaseThermophysicalTransportModel, \
filmCompressibleMomentumTransportModel, \
fluidThermo, \
laminar, \
Type \
)
// ************************************************************************* //

View File

@ -0,0 +1,56 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "film.H"
#include "fvmDdt.H"
#include "fvmDiv.H"
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void Foam::solvers::film::thermophysicalPredictor()
{
volScalarField& he = thermo.he();
fvScalarMatrix heEqn
(
fvm::ddt(alpha, rho, he) + fvm::div(alphaRhoPhi, he)
+ thermophysicalTransport->divq(he)
==
fvModels().source(alpha, rho, he)
);
heEqn.relax();
fvConstraints().constrain(heEqn);
heEqn.solve();
fvConstraints().constrain(he);
thermo.correct();
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 300;
boundaryField
{
inlet
{
type fixedValue;
value uniform 300;
}
outlet
{
type zeroGradient;
}
sides
{
type zeroGradient;
}
wall
{
type coupledTemperature;
value $internalField;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (0 -0.075 0);
// value uniform (0 -0.25 0);
}
outlet
{
type zeroGradient;
}
sides
{
type noSlip;
}
wall
{
type noSlip;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,63 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object delta;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type turbulentInlet;
// type fixedValue;
fluctuationScale 0.05;
referenceField uniform 1e-3;
alpha 0.1;
value uniform 1e-3;
}
outlet
{
type zeroGradient;
}
sides
{
type zeroGradient;
}
wall
{
type filmContactAngle;
contactAngle
{
type gravitational;
theta0 70;
thetaAdv 90;
thetaRec 50;
gTheta 0.1;
}
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,49 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
sides
{
type zeroGradient;
}
wall
{
type zeroGradient;
}
empty
{
type empty;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class volScalarField;
location "0/panel";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 0 0 1 0 0 0 ];
internalField uniform 330;
boundaryField
{
"(inlet|outlet|sides)"
{
type zeroGradient;
}
wall
{
type coupledTemperature;
value $internalField;
}
insulatedWall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf constant/panel/polyMesh
rm -rf constant/film/polyMesh
#------------------------------------------------------------------------------

View File

@ -0,0 +1,25 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh -region panel
runApplication -s 1 decomposePar -region panel -noFields
runParallel extrudeToRegionMesh -region panel -overwrite
runApplication -s 1 reconstructPar -allRegions
runApplication -s 2 decomposePar -fields -allRegions
printf "\n%s\n" "Creating files for paraview post-processing"
paraFoam -touchAll
echo
runParallel $(getApplication)
runApplication reconstructPar -allRegions
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value (0 -9.81 0);
// ************************************************************************* //

View File

@ -0,0 +1,20 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "constant";
object momentumTransport;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar;
// ************************************************************************* //

View File

@ -0,0 +1,39 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "constant";
object physicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heRhoThermo;
mixture pureMixture;
properties liquid;
energy sensibleInternalEnergy;
}
mixture
{
H2O;
}
sigma
{
type constant;
sigma 0.07;
}
deltaWet 1e-8;
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "constant/metal";
object physicalProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType
{
type heSolidThermo;
mixture pureMixture;
transport constIsoSolid;
thermo eConst;
equationOfState rhoConst;
specie specie;
energy sensibleInternalEnergy;
}
mixture
{
// Aluminium
specie
{
molWeight 27;
}
equationOfState
{
rho 2700;
}
transport
{
kappa 200;
}
thermodynamics
{
Hf 0;
Cv 900;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,61 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application foamMultiRun;
regionSolvers
{
film film;
panel solid;
}
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 1e-4;
writeControl adjustableRunTime;
writeInterval 0.1;
purgeWrite 0;
writeFormat binary;
writePrecision 10;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.2;
maxDeltaT 5e-3;
libs ("libisothermalFilm.so");
// ************************************************************************* //

View File

@ -0,0 +1,42 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method scotch;
simpleCoeffs
{
n (2 2 1);
}
hierarchicalCoeffs
{
n (1 1 1);
order xyz;
}
manualCoeffs
{
dataFile "";
}
distributed no;
roots ( );
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default filmGauss linear;
}
divSchemes
{
default none;
div(phid,alpha) Gauss upwind; // vanLeer;
div(alphaRhoPhi,U) Gauss upwind;
div(alphaRhoPhi,e) Gauss upwind;
}
laplacianSchemes
{
default Gauss linear orthogonal;
}
snGradSchemes
{
default orthogonal;
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}
"(U|e).*"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-10;
relTol 0;
}
}
PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
equations
{
".*" 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
PIMPLE
{
nOuterCorrectors 1;
}
// ************************************************************************* //

View File

@ -0,0 +1,106 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 1;
vertices
(
// front
( 0 0 0.002)
( 0.125 0 0.002)
( 0.625 0 0.002)
( 0.750 0 0.002)
( 0 1 0.002)
( 0.125 1 0.002)
( 0.625 1 0.002)
( 0.750 1 0.002)
// back
( 0 0 0)
( 0.125 0 0)
( 0.625 0 0)
( 0.750 0 0)
( 0 1 0)
( 0.125 1 0)
( 0.625 1 0)
( 0.750 1 0)
);
blocks
(
hex (0 1 9 8 4 5 13 12) (30 1 240) simpleGrading (1 1 1)
hex (1 2 10 9 5 6 14 13) (120 1 240) simpleGrading (1 1 1)
hex (2 3 11 10 6 7 15 14) (30 1 240) simpleGrading (1 1 1)
);
boundary
(
inlet
{
type patch;
faces
(
(5 6 14 13)
);
}
outlet
{
type patch;
faces
(
(0 1 9 8)
(1 2 10 9)
(2 3 11 10)
);
}
sides
{
type patch;
faces
(
(8 0 4 12)
(15 7 3 11)
(13 5 4 12)
(15 7 6 14)
);
}
extrudeWall
{
type wall;
faces
(
(0 1 5 4)
(1 2 6 5)
(2 3 7 6)
);
}
insulatedWall
{
type wall;
faces
(
(8 12 13 9)
(9 13 14 10)
(10 14 15 11)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,42 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object extrudeToRegionMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
region film;
patches (extrudeWall);
adaptMesh yes;
patchTypes (mappedWall);
patchNames (wall);
regionPatchTypes (mappedFilmWall);
regionPatchNames (wall);
regionOppositePatchTypes (empty);
regionOppositePatchNames (empty);
extrudeModel linearNormal;
nLayers 1;
expansionRatio 1;
linearNormalCoeffs
{
thickness 0.01;
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system/metal";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -0,0 +1,40 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
location "system/metal";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
e
{
solver GAMG;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0.1;
maxIter 10;
}
eFinal
{
$e;
relTol 0;
}
}
PIMPLE
{
nNonOrthogonalCorrectors 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase && rm -rf constant system 0
#------------------------------------------------------------------------------

View File

@ -0,0 +1,19 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run and clean functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Copy the source case
isTest "$@" && path=.. || path=$FOAM_TUTORIALS/modules/isothermalFilm
cp -r $path/rivuletPanel/constant .
cp -r $path/rivuletPanel/system .
cp -r $path/rivuletPanel/0 .
runApplication -a foamDictionary system/controlDict -entry solver -set film
runApplication blockMesh
runApplication foamRun
#------------------------------------------------------------------------------