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
b5d1ab43
Commit
b5d1ab43
authored
Dec 06, 2012
by
andy
Browse files
ENH: Updated solver run-time selectable sources
parent
cf6956f1
Changes
25
Hide whitespace changes
Inline
Side-by-side
applications/solvers/combustion/XiFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -29,7 +29,7 @@ if (pimple.transonic())
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
@@ -64,7 +64,7 @@ else
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
applications/solvers/combustion/engineFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -26,7 +26,7 @@ if (pimple.transonic())
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
@@ -58,7 +58,7 @@ else
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
applications/solvers/combustion/fireFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -37,7 +37,7 @@ while (pimple.correctNonOrthogonal())
+
sources
(
psi
,
p_rgh
,
rho
.
name
())
);
sources
.
constrain
(
p_rghEqn
,
rho
.
name
()
);
sources
.
constrain
(
p_rghEqn
);
p_rghEqn
.
solve
(
mesh
.
solver
(
p_rgh
.
select
(
pimple
.
finalInnerIter
())));
...
...
applications/solvers/combustion/reactingFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -29,7 +29,7 @@ if (pimple.transonic())
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
@@ -64,7 +64,7 @@ else
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
applications/solvers/combustion/rhoReactingFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -40,7 +40,7 @@
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
@@ -80,7 +80,7 @@
-
fvm
::
laplacian
(
rho
*
rAU
,
p
)
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
applications/solvers/compressible/rhoPimpleFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -39,7 +39,7 @@ if (pimple.transonic())
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
@@ -77,7 +77,7 @@ else
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
applications/solvers/compressible/rhoPimpleFoam/rhoPimplecFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -51,7 +51,7 @@ if (pimple.transonic())
// Relax the pressure equation to maintain diagonal dominance
pEqn
.
relax
();
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
();
...
...
@@ -89,7 +89,7 @@ else
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
();
...
...
applications/solvers/compressible/rhoSimpleFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -35,7 +35,7 @@
// Relax the pressure equation to ensure diagonal-dominance
pEqn
.
relax
();
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
...
...
@@ -71,7 +71,7 @@
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
();
...
...
applications/solvers/compressible/rhoSimpleFoam/rhoSimplecFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -45,7 +45,7 @@ if (simple.transonic())
// Relax the pressure equation to maintain diagonal dominance
pEqn
.
relax
();
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
...
...
@@ -82,7 +82,7 @@ else
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
...
...
applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -42,7 +42,7 @@
-
fvm
::
laplacian
(
rhorAUf
,
p_rgh
)
);
sources
.
constrain
(
p_rghEqn
,
rho
.
name
()
);
sources
.
constrain
(
p_rghEqn
);
p_rghEqn
.
solve
(
mesh
.
solver
(
p_rgh
.
select
(
pimple
.
finalInnerIter
())));
...
...
applications/solvers/lagrangian/coalChemistryFoam/UEqn.H
View file @
b5d1ab43
...
...
@@ -7,6 +7,7 @@
rho
.
dimensionedInternalField
()
*
g
+
coalParcels
.
SU
(
U
)
+
limestoneParcels
.
SU
(
U
)
+
sources
(
rho
,
U
)
);
UEqn
.
relax
();
...
...
@@ -15,6 +16,6 @@
if
(
pimple
.
momentumPredictor
())
{
solve
(
UEqn
==
-
fvc
::
grad
(
p
)
+
sources
(
rho
,
U
)
);
solve
(
UEqn
==
-
fvc
::
grad
(
p
));
K
=
0
.
5
*
magSqr
(
U
);
}
applications/solvers/lagrangian/coalChemistryFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -2,7 +2,7 @@ rho = thermo.rho();
volScalarField
rAU
(
1
.
0
/
UEqn
.
A
());
volVectorField
HbyA
(
"HbyA"
,
U
);
HbyA
=
rAU
*
(
UEqn
==
sources
(
rho
,
U
))()
.
H
();
HbyA
=
rAU
*
UEqn
.
H
();
if
(
pimple
.
transonic
())
{
...
...
@@ -16,6 +16,8 @@ if (pimple.transonic())
)
);
sources
.
relativeFlux
(
fvc
::
interpolate
(
psi
),
phid
);
while
(
pimple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
...
...
@@ -28,7 +30,7 @@ if (pimple.transonic())
+
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
@@ -50,6 +52,8 @@ else
)
);
sources
.
relativeFlux
(
fvc
::
interpolate
(
rho
),
phiHbyA
);
while
(
pimple
.
correctNonOrthogonal
())
{
fvScalarMatrix
pEqn
...
...
@@ -62,7 +66,7 @@ else
+
sources
(
psi
,
p
,
rho
.
name
())
);
sources
.
constrain
(
pEqn
,
rho
.
name
()
);
sources
.
constrain
(
pEqn
);
pEqn
.
solve
(
mesh
.
solver
(
p
.
select
(
pimple
.
finalInnerIter
())));
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/EEqn.H
View file @
b5d1ab43
...
...
@@ -21,9 +21,11 @@
+
surfaceFilm
.
Sh
()
+
radiation
->
Sh
(
thermo
)
+
combustion
->
Sh
()
+
sources
(
rho
,
he
)
);
EEqn
.
relax
();
sources
.
constrain
(
EEqn
);
EEqn
.
solve
();
thermo
.
correct
();
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/Make/options
View file @
b5d1ab43
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/fieldSources/lnInclude \
-I${LIB_SRC}/sampling/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/lagrangian/distributionModels/lnInclude \
...
...
@@ -25,6 +27,8 @@ EXE_INC = \
EXE_LIBS = \
-lfiniteVolume \
-lfieldSources \
-lsampling \
-lmeshTools \
-lcompressibleRASModels \
-lcompressibleLESModels \
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/UEqn.H
View file @
b5d1ab43
...
...
@@ -5,10 +5,13 @@
+
turbulence
->
divDevRhoReff
(
U
)
==
parcels
.
SU
(
U
)
+
sources
(
rho
,
U
)
);
UEqn
.
relax
();
sources
.
constrain
(
UEqn
);
if
(
pimple
.
momentumPredictor
())
{
solve
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H
View file @
b5d1ab43
...
...
@@ -22,18 +22,24 @@ tmp<fv::convectionScheme<scalar> > mvConvection
{
volScalarField
&
Yi
=
Y
[
i
];
solve
fvScalarMatrix
YEqn
(
fvm
::
ddt
(
rho
,
Yi
)
+
mvConvection
->
fvmDiv
(
phi
,
Yi
)
-
fvm
::
laplacian
(
turbulence
->
alphaEff
(),
Yi
)
==
parcels
.
SYi
(
i
,
Yi
)
+
sources
(
rho
,
Yi
)
+
combustion
->
R
(
Yi
)
+
surfaceFilm
.
Srho
(
i
)
+
combustion
->
R
(
Yi
),
mesh
.
solver
(
"Yi"
)
);
YEqn
.
relax
();
sources
.
constrain
(
YEqn
);
YEqn
.
solve
(
mesh
.
solver
(
"Yi"
));
Yi
.
max
(
0
.
0
);
Yt
+=
Yi
;
}
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H
View file @
b5d1ab43
...
...
@@ -139,3 +139,5 @@
mesh
,
dimensionedScalar
(
"dQ"
,
dimEnergy
/
dimTime
,
0
.
0
)
);
IObasicSourceList
sources
(
mesh
);
applications/solvers/lagrangian/reactingParcelFilmFoam/pEqn.H
View file @
b5d1ab43
...
...
@@ -18,6 +18,7 @@ surfaceScalarField phiHbyA
+
phig
);
sources
.
relativeFlux
(
fvc
::
interpolate
(
rho
),
phiHbyA
);
while
(
pimple
.
correctNonOrthogonal
())
{
...
...
@@ -30,8 +31,11 @@ while (pimple.correctNonOrthogonal())
==
parcels
.
Srho
()
+
surfaceFilm
.
Srho
()
+
sources
(
psi
,
p_rgh
,
rho
.
name
())
);
sources
.
constrain
(
p_rghEqn
);
p_rghEqn
.
solve
(
mesh
.
solver
(
p_rgh
.
select
(
pimple
.
finalInnerIter
())));
if
(
pimple
.
finalNonOrthogonalIter
())
...
...
@@ -39,6 +43,7 @@ while (pimple.correctNonOrthogonal())
phi
=
phiHbyA
+
p_rghEqn
.
flux
();
U
=
HbyA
+
rAU
*
fvc
::
reconstruct
((
p_rghEqn
.
flux
()
+
phig
)
/
rhorAUf
);
U
.
correctBoundaryConditions
();
sources
.
correct
(
U
);
}
}
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/reactingParcelFilmFoam.C
View file @
b5d1ab43
...
...
@@ -37,6 +37,7 @@ Description
#include
"psiCombustionModel.H"
#include
"radiationModel.H"
#include
"SLGThermo.H"
#include
"IObasicSourceList.H"
#include
"pimpleControl.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
applications/solvers/lagrangian/reactingParcelFilmFoam/rhoEqn.H
View file @
b5d1ab43
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2012
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -37,6 +37,7 @@ Description
==
parcels
.
Srho
(
rho
)
+
surfaceFilm
.
Srho
()
+
sources
(
rho
)
);
}
...
...
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