Skip to content
GitLab
Menu
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
8968d1d0
Commit
8968d1d0
authored
Nov 08, 2011
by
Sergio Ferraris
Browse files
ENH: Moving circuitBoardCooling tutorial to buoyantSimpleFoam folder
and deleting old buoyantBaffleSimpleFoam
parent
fe068c3b
Changes
37
Hide whitespace changes
Inline
Side-by-side
applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/files
deleted
100644 → 0
View file @
fe068c3b
buoyantBaffleSimpleFoam.C
EXE = $(FOAM_APPBIN)/buoyantBaffleSimpleFoam
applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/Make/options
deleted
100644 → 0
View file @
fe068c3b
EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/thermoBaffleModels/lnInclude
EXE_LIBS = \
-lmeshTools \
-lbasicThermophysicalModels \
-lspecie \
-lcompressibleTurbulenceModel \
-lcompressibleRASModels \
-lfiniteVolume \
-lmeshTools \
-lthermoBaffleModels \
-lregionModels
applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/UEqn.H
deleted
100644 → 0
View file @
fe068c3b
// Solve the Momentum equation
tmp
<
fvVectorMatrix
>
UEqn
(
fvm
::
div
(
phi
,
U
)
+
turbulence
->
divDevRhoReff
(
U
)
);
UEqn
().
relax
();
if
(
simple
.
momentumPredictor
())
{
solve
(
UEqn
()
==
fvc
::
reconstruct
(
(
-
ghf
*
fvc
::
snGrad
(
rho
)
-
fvc
::
snGrad
(
p_rgh
)
)
*
mesh
.
magSf
()
)
);
}
applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/buoyantBaffleSimpleFoam.C
deleted
100644 → 0
View file @
fe068c3b
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 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/>.
Application
buoyantBaffleSimpleFoam
Description
Steady-state solver for buoyant, turbulent flow of compressible fluids
using thermal baffles
\*---------------------------------------------------------------------------*/
#include
"fvCFD.H"
#include
"basicPsiThermo.H"
#include
"RASModel.H"
#include
"fixedGradientFvPatchFields.H"
#include
"simpleControl.H"
#include
"thermoBaffleModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int
main
(
int
argc
,
char
*
argv
[])
{
#include
"setRootCase.H"
#include
"createTime.H"
#include
"createMesh.H"
#include
"readGravitationalAcceleration.H"
#include
"createFields.H"
#include
"initContinuityErrs.H"
simpleControl
simple
(
mesh
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info
<<
"
\n
Starting time loop
\n
"
<<
endl
;
while
(
simple
.
loop
())
{
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
// Pressure-velocity SIMPLE corrector
{
#include
"UEqn.H"
#include
"hEqn.H"
#include
"pEqn.H"
}
turbulence
->
correct
();
runTime
.
write
();
Info
<<
"ExecutionTime = "
<<
runTime
.
elapsedCpuTime
()
<<
" s"
<<
" ClockTime = "
<<
runTime
.
elapsedClockTime
()
<<
" s"
<<
nl
<<
endl
;
}
Info
<<
"End
\n
"
<<
endl
;
return
0
;
}
// ************************************************************************* //
applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/createFields.H
deleted
100644 → 0
View file @
fe068c3b
Info
<<
"Reading thermophysical properties
\n
"
<<
endl
;
autoPtr
<
basicPsiThermo
>
pThermo
(
basicPsiThermo
::
New
(
mesh
)
);
basicPsiThermo
&
thermo
=
pThermo
();
volScalarField
rho
(
IOobject
(
"rho"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
NO_WRITE
),
thermo
.
rho
()
);
volScalarField
&
p
=
thermo
.
p
();
volScalarField
&
h
=
thermo
.
h
();
const
volScalarField
&
psi
=
thermo
.
psi
();
Info
<<
"Reading field U
\n
"
<<
endl
;
volVectorField
U
(
IOobject
(
"U"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
#include
"compressibleCreatePhi.H"
Info
<<
"Creating turbulence model
\n
"
<<
endl
;
autoPtr
<
compressible
::
RASModel
>
turbulence
(
compressible
::
RASModel
::
New
(
rho
,
U
,
phi
,
thermo
)
);
Info
<<
"Calculating field g.h
\n
"
<<
endl
;
volScalarField
gh
(
"gh"
,
g
&
mesh
.
C
());
surfaceScalarField
ghf
(
"ghf"
,
g
&
mesh
.
Cf
());
Info
<<
"Reading field p_rgh
\n
"
<<
endl
;
volScalarField
p_rgh
(
IOobject
(
"p_rgh"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
// Force p_rgh to be consistent with p
p_rgh
=
p
-
rho
*
gh
;
label
pRefCell
=
0
;
scalar
pRefValue
=
0
.
0
;
setRefCell
(
p
,
p_rgh
,
mesh
.
solutionDict
().
subDict
(
"SIMPLE"
),
pRefCell
,
pRefValue
);
autoPtr
<
regionModels
::
thermoBaffleModels
::
thermoBaffleModel
>
baffles
(
regionModels
::
thermoBaffleModels
::
thermoBaffleModel
::
New
(
mesh
)
);
dimensionedScalar
initialMass
=
fvc
::
domainIntegrate
(
rho
);
dimensionedScalar
totalVolume
=
sum
(
mesh
.
V
());
applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/hEqn.H
deleted
100644 → 0
View file @
fe068c3b
{
fvScalarMatrix
hEqn
(
fvm
::
div
(
phi
,
h
)
-
fvm
::
Sp
(
fvc
::
div
(
phi
),
h
)
-
fvm
::
laplacian
(
turbulence
->
alphaEff
(),
h
)
==
fvc
::
div
(
phi
/
fvc
::
interpolate
(
rho
)
*
fvc
::
interpolate
(
p
))
-
p
*
fvc
::
div
(
phi
/
fvc
::
interpolate
(
rho
))
);
hEqn
.
relax
();
hEqn
.
solve
();
baffles
->
evolve
();
thermo
.
correct
();
}
applications/solvers/heatTransfer/buoyantBaffleSimpleFoam/pEqn.H
deleted
100644 → 0
View file @
fe068c3b
{
rho
=
thermo
.
rho
();
rho
.
relax
();
volScalarField
rAU
(
1
.
0
/
UEqn
().
A
());
surfaceScalarField
rhorAUf
(
"(rho*(1|A(U)))"
,
fvc
::
interpolate
(
rho
*
rAU
));
U
=
rAU
*
UEqn
().
H
();
UEqn
.
clear
();
phi
=
fvc
::
interpolate
(
rho
)
*
(
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
());
bool
closedVolume
=
adjustPhi
(
phi
,
U
,
p_rgh
);
surfaceScalarField
buoyancyPhi
(
rhorAUf
*
ghf
*
fvc
::
snGrad
(
rho
)
*
mesh
.
magSf
());
phi
-=
buoyancyPhi
;
while
(
simple
.
correctNonOrthogonal
())
{
fvScalarMatrix
p_rghEqn
(
fvm
::
laplacian
(
rhorAUf
,
p_rgh
)
==
fvc
::
div
(
phi
)
);
p_rghEqn
.
setReference
(
pRefCell
,
getRefCellValue
(
p_rgh
,
pRefCell
));
p_rghEqn
.
solve
();
if
(
simple
.
finalNonOrthogonalIter
())
{
// Calculate the conservative fluxes
phi
-=
p_rghEqn
.
flux
();
// Explicitly relax pressure for momentum corrector
p_rgh
.
relax
();
// Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure
U
-=
rAU
*
fvc
::
reconstruct
((
buoyancyPhi
+
p_rghEqn
.
flux
())
/
rhorAUf
);
U
.
correctBoundaryConditions
();
}
}
#include
"continuityErrs.H"
p
=
p_rgh
+
rho
*
gh
;
// For closed-volume cases adjust the pressure level
// to obey overall mass continuity
if
(
closedVolume
)
{
p
+=
(
initialMass
-
fvc
::
domainIntegrate
(
psi
*
p
))
/
fvc
::
domainIntegrate
(
psi
);
p_rgh
=
p
-
rho
*
gh
;
}
rho
=
thermo
.
rho
();
rho
.
relax
();
Info
<<
"rho max/min : "
<<
max
(
rho
).
value
()
<<
" "
<<
min
(
rho
).
value
()
<<
endl
;
}
tutorials/heatTransfer/buoyantBaffleSimpleFoam/circuitBoardCooling/baffle.setSet
deleted
100644 → 0
View file @
fe068c3b
# Create face set
faceSet baffleFaces new boxToFace (0.29 0 0) (0.31 0.18 2)
faceZoneSet baffleFaces new setToFaceZone baffleFaces
faceSet baffleFaces2 new boxToFace (0.59 0.0 0.0)(0.61 0.18 2.0)
faceZoneSet baffleFaces2 new setToFaceZone baffleFaces2
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/0.org/T
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/T
View file @
8968d1d0
...
...
@@ -44,6 +44,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}
...
...
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/0.org/U
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U
View file @
8968d1d0
...
...
@@ -46,6 +46,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}
...
...
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/0.org/alphat
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/alphat
View file @
8968d1d0
...
...
@@ -45,6 +45,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}
...
...
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/Q
0 → 100644
View file @
8968d1d0
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object Q;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -3 0 0 0 0];
internalField uniform 17000;
boundaryField
{
".*"
{
type zeroGradient;
}
}
// ************************************************************************* //
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/T
0 → 100644
View file @
8968d1d0
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [ 0 0 0 1 0 0 0 ];
internalField uniform 300;
boundaryField
{
}
// ************************************************************************* //
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/0.org/epsilon
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon
View file @
8968d1d0
...
...
@@ -44,6 +44,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}
...
...
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/0.org/k
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k
View file @
8968d1d0
...
...
@@ -44,6 +44,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}
...
...
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/0.org/mut
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/mut
View file @
8968d1d0
...
...
@@ -45,6 +45,10 @@ boundaryField
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}
...
...
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/0.org/p
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p
View file @
8968d1d0
...
...
@@ -24,27 +24,31 @@ boundaryField
floor
{
type calculated;
value
uniform 101325
;
value
$internalField
;
}
ceiling
{
type calculated;
value
uniform 101325
;
value
$internalField
;
}
inlet
{
type calculated;
value
uniform 101325
;
value
$internalField
;
}
outlet
{
type calculated;
value
uniform 101325
;
value
$internalField
;
}
fixedWalls
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}
...
...
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/0.org/p_rgh
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh
View file @
8968d1d0
...
...
@@ -17,38 +17,38 @@ FoamFile
dimensions [ 1 -1 -2 0 0 0 0 ];
internalField uniform
0
;
internalField uniform
101325
;
boundaryField
{
floor
{
type buoyantPressure;
gradient uniform 0;
value uniform 0;
value $internalField;
}
ceiling
{
type buoyantPressure;
gradient uniform 0;
value uniform 0;
value $internalField;
}
inlet
{
type buoyantPressure;
gradient uniform 0;
value uniform 0;
value $internalField;
}
outlet
{
type buoyantPressure;
gradient uniform 0;
value uniform 0;
value $internalField;
}
fixedWalls
{
type empty;
}
"baffle1Wall.*"
{
type calculated;
}
}
...
...
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/Allclean
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean
View file @
8968d1d0
...
...
@@ -5,6 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory
.
$WM_PROJECT_DIR
/bin/tools/CleanFunctions
cleanCase
rm
-rf
constant/baffleRegion/polyMesh
rm
-rf
sets 0
# ----------------------------------------------------------------- end-of-file
tutorials/heatTransfer/buoyant
Baffle
SimpleFoam/circuitBoardCooling/Allrun
→
tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun
View file @
8968d1d0
...
...
@@ -7,21 +7,26 @@ application=`getApplication`
cp
-r
0.org 0
runApplication blockMesh
runApplication
setSet
-batch
baffle.set
Set
runApplication
topo
Set
unset
FOAM_SETNAN
unset
FOAM_SIGFPE
# Add the patches for the baffles
runApplication changeDictionary
-literalRE
rm
log.changeDictionary
# Create first baffle
createBaffles baffleFaces
'(baffle1Wall_0 baffle1Wall_1)'
-overwrite
>
log.createBaffles 2>&1
# Create second baffle
createBaffles baffleFaces2
'(baffle2Wall_0 baffle2Wall_1)'
-overwrite
>
log.createBaffles 2>&1
# Reset proper values at the baffles
runApplication changeDictionary
# Create region
runApplication extrudeToRegionMesh
-overwrite
# Set the BC's for the baffle
runApplication changeDictionary
-dict
system/changeDictionaryDict.baffle
rm
log.changeDictionary
# Set Bc's for the region baffle
runApplication changeDictionary
-dict
system/changeDictionaryDict.baffleRegion
-literalRE
rm
log.changeDictionary
# Reset proper values at the region
runApplication changeDictionary
-region
baffleRegion
-literalRE
runApplication
$application
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment