Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
bb9225f3
Commit
bb9225f3
authored
Jun 10, 2019
by
sergio
Committed by
Andrew Heather
Jun 10, 2019
Browse files
Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop
parents
fa617757
533410aa
Changes
1000
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
20 of 1000+
files are displayed.
Plain diff
Email patch
Allwmake
View file @
bb9225f3
...
...
@@ -24,7 +24,7 @@ command -v mpirun 2>/dev/null || true
echo
"========================================"
date
"+%Y-%m-%d %H:%M:%S %z"
2>/dev/null
||
echo
"date is unknown"
echo
"Starting compile
${
WM_PROJECT_DIR
##*/
}
${
0
##*
}
"
echo
"Starting compile
${
WM_PROJECT_DIR
##*/
}
${
0
##*
/
}
"
echo
"
$WM_COMPILER
$WM_COMPILER_TYPE
compiler"
echo
"
${
WM_OPTIONS
}
, with
${
WM_MPLIB
}
${
FOAM_MPI
}
"
echo
"========================================"
...
...
README.md
View file @
bb9225f3
...
...
@@ -17,6 +17,32 @@ Please [contact OpenCFD](http://www.openfoam.com/contact) if you have any questi
Violations of the Trademark are continuously monitored, and will be duly prosecuted.
# Compiling OpenFOAM
Please see the relevant guides:
| Location | Readme | Requirements | Build |
|-------------|-----------|--------------|-------|
|
[
OpenFOAM
][
repo openfoam
]
|
[
readme
][
link openfoam-readme
]
|
[
system requirements
][
link openfoam-require
]
|
[
build
][
link openfoam-build
]
|
|
[
ThirdParty
][
repo third
]
|
[
readme
][
link third-readme
]
|
[
system requirements
][
link third-require
]
|
[
build
][
link third-build
]
|
<!-- OpenFOAM -->
[
repo openfoam
]:
https://develop.openfoam.com/Development/OpenFOAM-plus/
[
repo third
]:
https://develop.openfoam.com/Development/ThirdParty-plus/
[
link openfoam-issues
]:
https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/BuildIssues.txt
[
link openfoam-readme
]:
https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/README.md
[
link openfoam-config
]:
https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/etc/README.md
[
link openfoam-build
]:
https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Build.md
[
link openfoam-require
]:
https://develop.openfoam.com/Development/OpenFOAM-plus/blob/develop/doc/Requirements.md
[
link third-readme
]:
https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/README.md
[
link third-build
]:
https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/BUILD.md
[
link third-require
]:
https://develop.openfoam.com/Development/ThirdParty-plus/blob/develop/Requirements.md
# Useful Links
-
[
Download and installation instructions
](
http://www.openfoam.com/download/
)
-
[
Documentation
](
http://www.openfoam.com/documentation
)
...
...
@@ -24,4 +50,4 @@ Violations of the Trademark are continuously monitored, and will be duly prosecu
-
[
OpenFOAM Community
](
http://www.openfoam.com/community/
)
-
[
Contacting OpenCFD
](
http://www.openfoam.com/contact/
)
Copyright 2016-201
8
OpenCFD Ltd
Copyright 2016-201
9
OpenCFD Ltd
applications/solvers/basic/potentialFoam/createFields.H
View file @
bb9225f3
...
...
@@ -57,9 +57,6 @@ forAll(U.boundaryField(), patchi)
}
}
// Note that registerObject is false for the pressure field. The pressure
// field in this solver doesn't have a physical value during the solution.
// It shouldn't be looked up and used by sub models or boundary conditions.
Info
<<
"Constructing pressure field "
<<
pName
<<
nl
<<
endl
;
volScalarField
p
(
...
...
@@ -69,8 +66,7 @@ volScalarField p
runTime
.
timeName
(),
mesh
,
IOobject
::
READ_IF_PRESENT
,
IOobject
::
NO_WRITE
,
false
IOobject
::
NO_WRITE
),
mesh
,
dimensionedScalar
(
sqr
(
dimVelocity
),
Zero
),
...
...
applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/Make/files
0 → 100644
View file @
bb9225f3
derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C
../solid/solidRegionDiffNo.C
chtMultiRegionTwoPhaseEulerFoam.C
EXE = $(FOAM_APPBIN)/chtMultiRegionTwoPhaseEulerFoam
applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/Make/options
0 → 100644
View file @
bb9225f3
EXE_INC = \
-I. \
-I.. \
-I$(FOAM_SOLVERS)/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam \
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/lnInclude \
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/lnInclude \
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/phaseSystems/lnInclude \
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/interfacialModels/lnInclude \
-I$(LIB_SRC)/phaseSystemModels/reactingEulerFoam/interfacialCompositionModels/lnInclude \
-I./fluid \
-I../solid \
-I../fluid \
-I../include \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/phaseCompressible/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude
EXE_LIBS = \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lsolidThermo \
-ltwoPhaseReactingTurbulenceModels \
-lmeshTools \
-lfiniteVolume \
-lfvOptions \
-lradiationModels \
-lregionModels \
-lsampling \
-lreactingTwoPhaseSystem \
applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/chtMultiRegionTwoPhaseEulerFoam.C
0 → 100644
View file @
bb9225f3
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 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 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/>.
Application
chtMultiRegionTwoPhaseEulerFoam
Group
grpHeatTransferSolvers
Description
Transient solver for buoyant, turbulent fluid flow and solid heat
conduction with conjugate heat transfer between solid and fluid regions.
It solves a two-phase Euler approach on the fluid region.
\*---------------------------------------------------------------------------*/
#include
"fvCFD.H"
#include
"turbulentFluidThermoModel.H"
#include
"twoPhaseSystem.H"
#include
"phaseCompressibleTurbulenceModel.H"
#include
"pimpleControl.H"
#include
"fixedGradientFvPatchFields.H"
#include
"regionProperties.H"
#include
"solidRegionDiffNo.H"
#include
"solidThermo.H"
#include
"radiationModel.H"
#include
"fvOptions.H"
#include
"coordinateSystem.H"
#include
"loopControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
argList
::
addNote
(
"Transient solver for buoyant, turbulent two phase fluid flow and"
"solid heat conduction with conjugate heat transfer "
"between solid and fluid regions."
);
#define NO_CONTROL
#define CREATE_MESH createMeshesPostProcess.H
#include
"postProcess.H"
#include
"setRootCase.H"
#include
"createTime.H"
#include
"createMeshes.H"
#include
"createFields.H"
#include
"initContinuityErrs.H"
#include
"createTimeControls.H"
#include
"readSolidTimeControls.H"
#include
"compressibleMultiRegionCourantNo.H"
#include
"solidRegionDiffusionNo.H"
#include
"setInitialMultiRegionDeltaT.H"
while
(
runTime
.
run
())
{
#include
"readTimeControls.H"
#include
"readSolidTimeControls.H"
#include
"readPIMPLEControls.H"
#include
"compressibleMultiRegionCourantNo.H"
#include
"solidRegionDiffusionNo.H"
#include
"setMultiRegionDeltaT.H"
++
runTime
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
if
(
nOuterCorr
!=
1
)
{
forAll
(
fluidRegions
,
i
)
{
#include
"storeOldFluidFields.H"
}
}
// --- PIMPLE loop
for
(
int
oCorr
=
0
;
oCorr
<
nOuterCorr
;
++
oCorr
)
{
const
bool
finalIter
=
(
oCorr
==
nOuterCorr
-
1
);
forAll
(
fluidRegions
,
i
)
{
Info
<<
"
\n
Solving for fluid region "
<<
fluidRegions
[
i
].
name
()
<<
endl
;
#include
"setRegionFluidFields.H"
#include
"readFluidMultiRegionPIMPLEControls.H"
#include
"solveFluid.H"
}
forAll
(
solidRegions
,
i
)
{
Info
<<
"
\n
Solving for solid region "
<<
solidRegions
[
i
].
name
()
<<
endl
;
#include
"setRegionSolidFields.H"
#include
"readSolidMultiRegionPIMPLEControls.H"
#include
"solveSolid.H"
}
// Additional loops for energy solution only
if
(
!
oCorr
&&
nOuterCorr
>
1
)
{
loopControl
looping
(
runTime
,
pimple
,
"energyCoupling"
);
while
(
looping
.
loop
())
{
Info
<<
nl
<<
looping
<<
nl
;
forAll
(
fluidRegions
,
i
)
{
Info
<<
"
\n
Solving for fluid region "
<<
fluidRegions
[
i
].
name
()
<<
endl
;
#include
"setRegionFluidFields.H"
#include
"readFluidMultiRegionPIMPLEControls.H"
frozenFlow
=
true
;
#include
"solveFluid.H"
}
forAll
(
solidRegions
,
i
)
{
Info
<<
"
\n
Solving for solid region "
<<
solidRegions
[
i
].
name
()
<<
endl
;
#include
"setRegionSolidFields.H"
#include
"readSolidMultiRegionPIMPLEControls.H"
#include
"solveSolid.H"
}
}
}
}
runTime
.
write
();
runTime
.
printExecutionTime
(
Info
);
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/derivedFvPatchFields/turbulentTemperatureTwoPhaseRadCoupledMixed/turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.C
0 → 100644
View file @
bb9225f3
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 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 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
"turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField.H"
#include
"addToRunTimeSelectionTable.H"
#include
"fvPatchFieldMapper.H"
#include
"volFields.H"
#include
"phaseSystem.H"
#include
"mappedPatchBase.H"
#include
"solidThermo.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const
Foam
::
Enum
<
Foam
::
compressible
::
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
::
regionType
>
Foam
::
compressible
::
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
::
regionTypeNames_
{
{
regionType
::
solid
,
"solid"
},
{
regionType
::
fluid
,
"fluid"
},
};
const
Foam
::
Enum
<
Foam
::
compressible
::
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
::
KMethodType
>
Foam
::
compressible
::
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
::
KMethodTypeNames_
{
{
KMethodType
::
mtSolidThermo
,
"solidThermo"
},
{
KMethodType
::
mtLookup
,
"lookup"
},
{
KMethodType
::
mtPhaseSystem
,
"phaseSystem"
}
};
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam
::
tmp
<
Foam
::
scalarField
>
Foam
::
compressible
::
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
::
kappa
(
const
scalarField
&
Tp
)
const
{
const
polyMesh
&
mesh
=
patch
().
boundaryMesh
().
mesh
();
const
label
patchi
=
patch
().
index
();
switch
(
method_
)
{
case
mtSolidThermo
:
{
const
solidThermo
&
thermo
=
mesh
.
lookupObject
<
solidThermo
>
(
basicThermo
::
dictName
);
return
thermo
.
kappa
(
patchi
);
break
;
}
case
mtLookup
:
{
if
(
mesh
.
foundObject
<
volScalarField
>
(
kappaName_
))
{
return
patch
().
lookupPatchField
<
volScalarField
,
scalar
>
(
kappaName_
);
}
else
if
(
mesh
.
foundObject
<
volSymmTensorField
>
(
kappaName_
))
{
const
symmTensorField
&
KWall
=
patch
().
lookupPatchField
<
volSymmTensorField
,
scalar
>
(
kappaName_
);
const
vectorField
n
(
patch
().
nf
());
return
n
&
KWall
&
n
;
}
else
{
FatalErrorInFunction
<<
"Did not find field "
<<
kappaName_
<<
" on mesh "
<<
mesh
.
name
()
<<
" patch "
<<
patch
().
name
()
<<
nl
<<
" Please set 'kappa' to the name of a volScalarField"
<<
" or volSymmTensorField."
<<
exit
(
FatalError
);
}
break
;
}
case
mtPhaseSystem
:
{
// Lookup the fluid model
const
phaseSystem
&
fluid
=
(
mesh
.
lookupObject
<
phaseSystem
>
(
"phaseProperties"
)
);
tmp
<
scalarField
>
kappaEff
(
new
scalarField
(
patch
().
size
(),
0
.
0
)
);
forAll
(
fluid
.
phases
(),
phasei
)
{
const
phaseModel
&
phase
=
fluid
.
phases
()[
phasei
];
const
fvPatchScalarField
&
alpha
=
phase
.
boundaryField
()[
patchi
];
kappaEff
.
ref
()
+=
alpha
*
phase
.
kappaEff
(
patchi
)();
}
return
kappaEff
;
break
;
}
default:
{
FatalErrorInFunction
<<
"Unimplemented method "
<<
KMethodTypeNames_
[
method_
]
<<
nl
<<
"Please set 'kappaMethod' to one of "
<<
flatOutput
(
KMethodTypeNames_
.
sortedToc
())
<<
nl
<<
"and 'kappa' to the name of the volScalar"
<<
exit
(
FatalError
);
}
}
return
scalarField
(
0
);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
namespace
compressible
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
::
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
)
:
mixedFvPatchScalarField
(
p
,
iF
),
regionType_
(
fluid
),
method_
(
mtLookup
),
kappaName_
(
"none"
),
otherPhaseName_
(
"vapor"
),
TnbrName_
(
"undefined-Tnbr"
),
qrNbrName_
(
"undefined-qrNbr"
),
qrName_
(
"undefined-qr"
)
{
this
->
refValue
()
=
0
.
0
;
this
->
refGrad
()
=
0
.
0
;
this
->
valueFraction
()
=
1
.
0
;
}
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
::
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
(
const
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
&
psf
,
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
fvPatchFieldMapper
&
mapper
)
:
mixedFvPatchScalarField
(
psf
,
p
,
iF
,
mapper
),
regionType_
(
psf
.
regionType_
),
method_
(
psf
.
method_
),
kappaName_
(
psf
.
kappaName_
),
otherPhaseName_
(
psf
.
otherPhaseName_
),
TnbrName_
(
psf
.
TnbrName_
),
qrNbrName_
(
psf
.
qrNbrName_
),
qrName_
(
psf
.
qrName_
)
{}
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
::
turbulentTemperatureTwoPhaseRadCoupledMixedFvPatchScalarField
(
const
fvPatch
&
p
,
const
DimensionedField
<
scalar
,
volMesh
>&
iF
,
const
dictionary
&
dict
)
:
mixedFvPatchScalarField
(
p
,
iF
),
regionType_
(
regionTypeNames_
.
read
(
dict
.
lookup
(
"region"
))),
method_
(
KMethodTypeNames_
.
get
(
"kappaMethod"
,
dict
)),
kappaName_
(
dict
.
lookupOrDefault
<
word
>
(
"kappa"
,
"none"
)),
otherPhaseName_
(
dict
.
lookup
(
"otherPhase"
)),
TnbrName_
(
dict
.
lookupOrDefault
<
word
>
(
"Tnbr"
,
"T"
)),
qrNbrName_
(
dict
.
lookupOrDefault
<
word
>
(
"qrNbr"
,
"none"
)),
qrName_
(
dict
.
lookupOrDefault
<
word
>
(
"qr"
,
"none"
))
{
if
(
!
isA
<
mappedPatchBase
>
(
this
->
patch
().
patch
()))
{
FatalErrorInFunction
<<
"' not type '"
<<
mappedPatchBase
::
typeName
<<
"'"
<<
"
\n
for patch "
<<
p
.
name
()
<<
" of field "
<<
internalField
().
name
()
<<
" in file "
<<
internalField
().
objectPath
()
<<
exit
(
FatalError
);
}
fvPatchScalarField
::
operator
=
(
scalarField
(
"value"
,
dict
,
p
.
size
()));
if
(
dict
.
found
(
"refValue"
))
{
// Full restart
refValue
()
=
scalarField
(
"refValue"
,
dict
,
p
.
size
());
refGrad
()
=
scalarField
(
"refGradient"
,
dict
,
p
.
size
());
valueFraction
()
=
scalarField
(
"valueFraction"
,
dict
,
p
.
size
());
}
else