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
ccfb6e32
Commit
ccfb6e32
authored
Jun 23, 2010
by
henry
Browse files
Corrected headers.
parent
1e3a40aa
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
applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H
View file @
ccfb6e32
...
...
@@ -13,7 +13,6 @@
);
TEqn
.
relax
();
TEqn
.
solve
();
rhok
=
1
.
0
-
beta
*
(
T
-
TRef
);
...
...
applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H
View file @
ccfb6e32
...
...
@@ -8,15 +8,18 @@
UEqn
().
relax
();
solve
(
UEqn
()
==
fvc
::
reconstruct
if
(
momentumPredictor
)
{
solve
(
UEqn
()
==
fvc
::
reconstruct
(
fvc
::
interpolate
(
rhok
)
*
(
g
&
mesh
.
Sf
())
-
fvc
::
snGrad
(
p
)
*
mesh
.
magSf
()
(
-
ghf
*
fvc
::
snGrad
(
rhok
)
-
fvc
::
snGrad
(
p_rgh
)
)
*
mesh
.
magSf
()
)
)
);
)
;
}
applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C
View file @
ccfb6e32
...
...
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
#include
"readSIMPLEControls.H"
p
.
storePrevIter
();
p
_rgh
.
storePrevIter
();
// Pressure-velocity SIMPLE corrector
{
...
...
applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H
View file @
ccfb6e32
...
...
@@ -14,12 +14,12 @@
mesh
);
Info
<<
"Reading field p
\n
"
<<
endl
;
volScalarField
p
Info
<<
"Reading field p
_rgh
\n
"
<<
endl
;
volScalarField
p
_rgh
(
IOobject
(
"p"
,
"p
_rgh
"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
...
...
@@ -42,9 +42,9 @@
mesh
);
#
include "createPhi.H"
#
include
"createPhi.H"
#
include "readTransportProperties.H"
#
include
"readTransportProperties.H"
Info
<<
"Creating turbulence model
\n
"
<<
endl
;
autoPtr
<
incompressible
::
RASModel
>
turbulence
...
...
@@ -52,20 +52,6 @@
incompressible
::
RASModel
::
New
(
U
,
phi
,
laminarTransport
)
);
Info
<<
"Calculating field beta*(g.h)
\n
"
<<
endl
;
surfaceScalarField
betaghf
(
"betagh"
,
beta
*
(
g
&
mesh
.
Cf
()));
label
pRefCell
=
0
;
scalar
pRefValue
=
0
.
0
;
setRefCell
(
p
,
mesh
.
solutionDict
().
subDict
(
"SIMPLE"
),
pRefCell
,
pRefValue
);
// Kinematic density for buoyancy force
volScalarField
rhok
(
...
...
@@ -77,3 +63,47 @@
),
1
.
0
-
beta
*
(
T
-
TRef
)
);
Info
<<
"Calculating field g.h
\n
"
<<
endl
;
volScalarField
gh
(
"gh"
,
g
&
mesh
.
C
());
surfaceScalarField
ghf
(
"ghf"
,
g
&
mesh
.
Cf
());
volScalarField
p
(
IOobject
(
"p"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
NO_READ
,
IOobject
::
AUTO_WRITE
),
p_rgh
+
rhok
*
gh
);
label
p_rghRefCell
=
0
;
scalar
p_rghRefValue
=
0
.
0
;
setRefCell
(
p_rgh
,
mesh
.
solutionDict
().
subDict
(
"SIMPLE"
),
p_rghRefCell
,
p_rghRefValue
);
scalar
pRefValue
=
0
.
0
;
if
(
p_rgh
.
needReference
())
{
pRefValue
=
readScalar
(
mesh
.
solutionDict
().
subDict
(
"SIMPLE"
).
lookup
(
"pRefValue"
)
);
p
+=
dimensionedScalar
(
"p"
,
p
.
dimensions
(),
pRefValue
-
getRefCellValue
(
p
,
p_rghRefCell
)
);
}
applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H
View file @
ccfb6e32
...
...
@@ -6,45 +6,56 @@
UEqn
.
clear
();
phi
=
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
();
adjustPhi
(
phi
,
U
,
p
);
adjustPhi
(
phi
,
U
,
p
_rgh
);
surfaceScalarField
buoyancyPhi
=
rUAf
*
fvc
::
interpolate
(
rhok
)
*
(
g
&
mesh
.
Sf
());
phi
+=
buoyancyPhi
;
surfaceScalarField
buoyancyPhi
=
rUAf
*
ghf
*
fvc
::
snGrad
(
rhok
)
*
mesh
.
magSf
();
phi
-=
buoyancyPhi
;
for
(
int
nonOrth
=
0
;
nonOrth
<=
nNonOrthCorr
;
nonOrth
++
)
{
fvScalarMatrix
pEqn
fvScalarMatrix
p
_rgh
Eqn
(
fvm
::
laplacian
(
rUAf
,
p
)
==
fvc
::
div
(
phi
)
fvm
::
laplacian
(
rUAf
,
p
_rgh
)
==
fvc
::
div
(
phi
)
);
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
p
_rgh
Eqn
.
setReference
(
p
_rgh
RefCell
,
p
_rgh
RefValue
);
// retain the residual from the first iteration
if
(
nonOrth
==
0
)
{
pEqn
.
solve
();
p
_rgh
Eqn
.
solve
();
}
else
{
pEqn
.
solve
();
p
_rgh
Eqn
.
solve
();
}
if
(
nonOrth
==
nNonOrthCorr
)
{
// Calculate the conservative fluxes
phi
-=
pEqn
.
flux
();
phi
-=
p
_rgh
Eqn
.
flux
();
// Explicitly relax pressure for momentum corrector
p
.
relax
();
p
_rgh
.
relax
();
// Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure
U
+
=
rUA
*
fvc
::
reconstruct
((
buoyancyPhi
-
pEqn
.
flux
())
/
rUAf
);
U
-
=
rUA
*
fvc
::
reconstruct
((
buoyancyPhi
+
p
_rgh
Eqn
.
flux
())
/
rUAf
);
U
.
correctBoundaryConditions
();
}
}
#include
"continuityErrs.H"
p
=
p_rgh
+
rhok
*
gh
;
if
(
p_rgh
.
needReference
())
{
p
+=
dimensionedScalar
(
"p"
,
p
.
dimensions
(),
pRefValue
-
getRefCellValue
(
p
,
p_rghRefCell
)
);
}
}
applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H
View file @
ccfb6e32
...
...
@@ -8,13 +8,18 @@
UEqn
().
relax
();
solve
(
UEqn
()
==
fvc
::
reconstruct
if
(
momentumPredictor
)
{
solve
(
fvc
::
interpolate
(
rho
)
*
(
g
&
mesh
.
Sf
())
-
fvc
::
snGrad
(
p
)
*
mesh
.
magSf
()
)
);
UEqn
()
==
fvc
::
reconstruct
(
(
-
ghf
*
fvc
::
snGrad
(
rho
)
-
fvc
::
snGrad
(
p_rgh
)
)
*
mesh
.
magSf
()
)
);
}
applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C
View file @
ccfb6e32
...
...
@@ -55,14 +55,17 @@ int main(int argc, char *argv[])
#include
"readSIMPLEControls.H"
p
.
storePrevIter
();
p
_rgh
.
storePrevIter
();
rho
.
storePrevIter
();
// Pressure-velocity SIMPLE corrector
{
#include
"UEqn.H"
#include
"hEqn.H"
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
#include
"pEqn.H"
}
}
turbulence
->
correct
();
...
...
applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H
View file @
ccfb6e32
...
...
@@ -23,6 +23,19 @@
volScalarField
&
h
=
thermo
.
h
();
const
volScalarField
&
psi
=
thermo
.
psi
();
Info
<<
"Reading field p_rgh
\n
"
<<
endl
;
volScalarField
p_rgh
(
IOobject
(
"p_rgh"
,
runTime
.
timeName
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
AUTO_WRITE
),
mesh
);
Info
<<
"Reading field U
\n
"
<<
endl
;
volVectorField
U
...
...
@@ -53,17 +66,40 @@
)
);
Info
<<
"Calculating field g.h
\n
"
<<
endl
;
volScalarField
gh
(
"gh"
,
g
&
mesh
.
C
());
surfaceScalarField
ghf
(
"ghf"
,
g
&
mesh
.
Cf
());
p
=
p_rgh
+
rho
*
gh
;
thermo
.
correct
();
rho
=
thermo
.
rho
();
p_rgh
=
p
-
rho
*
gh
;
label
pRefCell
=
0
;
scalar
pRefValue
=
0
.
0
;
label
p
_rgh
RefCell
=
0
;
scalar
p
_rgh
RefValue
=
0
.
0
;
setRefCell
(
p
,
p
_rgh
,
mesh
.
solutionDict
().
subDict
(
"SIMPLE"
),
pRefCell
,
pRefValue
p
_rgh
RefCell
,
p
_rgh
RefValue
);
scalar
pRefValue
=
0
.
0
;
if
(
p_rgh
.
needReference
())
{
pRefValue
=
readScalar
(
mesh
.
solutionDict
().
subDict
(
"SIMPLE"
).
lookup
(
"pRefValue"
)
);
p
+=
dimensionedScalar
(
"p"
,
p
.
dimensions
(),
pRefValue
-
getRefCellValue
(
p
,
p_rghRefCell
)
);
}
dimensionedScalar
initialMass
=
fvc
::
domainIntegrate
(
rho
);
applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H
View file @
ccfb6e32
...
...
@@ -10,7 +10,6 @@
);
hEqn
.
relax
();
hEqn
.
solve
();
thermo
.
correct
();
...
...
applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H
View file @
ccfb6e32
...
...
@@ -5,50 +5,52 @@
surfaceScalarField
rhorUAf
(
"(rho*(1|A(U)))"
,
fvc
::
interpolate
(
rho
*
rUA
));
U
=
rUA
*
UEqn
().
H
();
UEqn
.
clear
();
//
UEqn.clear();
phi
=
fvc
::
interpolate
(
rho
)
*
(
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
());
bool
closedVolume
=
adjustPhi
(
phi
,
U
,
p
);
bool
closedVolume
=
adjustPhi
(
phi
,
U
,
p
_rgh
);
surfaceScalarField
buoyancyPhi
=
rhorUAf
*
fvc
::
interpolate
(
rho
)
*
(
g
&
mesh
.
Sf
());
phi
+=
buoyancyPhi
;
surfaceScalarField
buoyancyPhi
=
rhorUAf
*
ghf
*
fvc
::
snGrad
(
rho
)
*
mesh
.
magSf
();
phi
-=
buoyancyPhi
;
for
(
int
nonOrth
=
0
;
nonOrth
<=
nNonOrthCorr
;
nonOrth
++
)
{
fvScalarMatrix
pEqn
fvScalarMatrix
p
_rgh
Eqn
(
fvm
::
laplacian
(
rhorUAf
,
p
)
==
fvc
::
div
(
phi
)
fvm
::
laplacian
(
rhorUAf
,
p
_rgh
)
==
fvc
::
div
(
phi
)
);
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
pEqn
.
solve
();
p
_rgh
Eqn
.
setReference
(
p
_rgh
RefCell
,
p
_rgh
RefValue
);
p
_rgh
Eqn
.
solve
();
if
(
nonOrth
==
nNonOrthCorr
)
{
// For closed-volume cases adjust the pressure and density levels
// to obey overall mass continuity
if
(
closedVolume
)
{
p
+=
(
initialMass
-
fvc
::
domainIntegrate
(
psi
*
p
))
/
fvc
::
domainIntegrate
(
psi
);
}
// Calculate the conservative fluxes
phi
-=
pEqn
.
flux
();
phi
-=
p
_rgh
Eqn
.
flux
();
// Explicitly relax pressure for momentum corrector
p
.
relax
();
p
_rgh
.
relax
();
// Correct the momentum source with the pressure gradient flux
// calculated from the relaxed pressure
U
+
=
rUA
*
fvc
::
reconstruct
((
buoyancyPhi
-
pEqn
.
flux
())
/
rhorUAf
);
U
-
=
rUA
*
fvc
::
reconstruct
((
buoyancyPhi
+
p
_rgh
Eqn
.
flux
())
/
rhorUAf
);
U
.
correctBoundaryConditions
();
}
}
#include
"continuityErrs.H"
p
=
p_rgh
+
rho
*
gh
;
// For closed-volume cases adjust the pressure and density levels
// 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
()
...
...
applications/solvers/multiphase/compressibleInterFoam/Make/options
View file @
ccfb6e32
EXE_INC = \
EXE_INC =
-ggdb3
\
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
...
...
applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C
View file @
ccfb6e32
...
...
@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
compressible
Les
InterFoam
compressibleInterFoam
Description
Solver for 2 compressible, isothermal immiscible fluids using a VOF
...
...
applications/solvers/multiphase/interMixingFoam/alphaEqns.H
View file @
ccfb6e32
...
...
@@ -75,8 +75,8 @@
alpha1
,
phiAlpha1BD
,
phiAlpha1
,
zero
(),
zero
(),
zero
Field
(),
zero
Field
(),
1
,
0
,
3
...
...
@@ -112,8 +112,8 @@
alpha2
,
phiAlpha2BD
,
phiAlpha2
,
zero
(),
zero
(),
zero
Field
(),
zero
Field
(),
1
,
0
,
3
...
...
applications/test/Hashing/hashingTests
View file @
ccfb6e32
...
...
@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.
org
|
| \\ / A nd | Web: www.OpenFOAM.
com
|
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
...
...
applications/test/dictionary/testDict
View file @
ccfb6e32
...
...
@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: Any |
| \\ / A nd | Web: www.OpenFOAM.
org
|
| \\ / A nd | Web: www.OpenFOAM.
com
|
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
...
...
applications/test/dictionary/testDict2
View file @
ccfb6e32
...
...
@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: Any |
| \\ / A nd | Web: www.OpenFOAM.
org
|
| \\ / A nd | Web: www.OpenFOAM.
com
|
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
...
...
applications/test/dictionary/testDictCalc
View file @
ccfb6e32
...
...
@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: Any |
| \\ / A nd | Web: www.OpenFOAM.
org
|
| \\ / A nd | Web: www.OpenFOAM.
com
|
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
...
...
applications/test/dictionary/testDictCalcError
View file @
ccfb6e32
...
...
@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: Any |
| \\ / A nd | Web: www.OpenFOAM.
org
|
| \\ / A nd | Web: www.OpenFOAM.
com
|
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
...
...
applications/test/dictionary/testDictRegex
View file @
ccfb6e32
...
...
@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.
org
|
| \\ / A nd | Web: www.OpenFOAM.
com
|
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
...
...
applications/test/regex/testRegexps
View file @
ccfb6e32
...
...
@@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.
org
|
| \\ / A nd | Web: www.OpenFOAM.
com
|
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
...
...
Prev
1
2
3
4
5
…
50
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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