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
499d0b4f
Commit
499d0b4f
authored
Dec 24, 2008
by
henry
Browse files
Merge branch 'master' of
ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
parents
7106f490
b7c0d4ff
Changes
92
Hide whitespace changes
Inline
Side-by-side
applications/solvers/incompressible/pisoFoam/pisoFoam.C
View file @
499d0b4f
...
...
@@ -70,6 +70,8 @@ int main(int argc, char *argv[])
+
turbulence
->
divDevReff
(
U
)
);
UEqn
.
relax
();
if
(
momentumPredictor
)
{
solve
(
UEqn
==
-
fvc
::
grad
(
p
));
...
...
applications/solvers/multiphase/cavitatingFoam/pEqn.H
View file @
499d0b4f
{
if
(
nOuterCorr
==
1
)
{
p
=
p
=
(
rho
-
(
1
.
0
-
gamma
)
*
rhol0
...
...
@@ -37,7 +37,14 @@
-
fvm
::
laplacian
(
rUAf
,
p
)
);
pEqn
.
solve
();
if
(
corr
==
nCorr
-
1
&&
nonOrth
==
nNonOrthCorr
)
{
pEqn
.
solve
(
mesh
.
solver
(
p
.
name
()
+
"Final"
));
}
else
{
pEqn
.
solve
(
mesh
.
solver
(
p
.
name
()));
}
if
(
nonOrth
==
nNonOrthCorr
)
{
...
...
applications/solvers/multiphase/compressibleInterDyMFoam/UEqn.H
View file @
499d0b4f
surfaceScalarField
muf
=
surfaceScalarField
muEff
(
"muEff"
,
twoPhaseProperties
.
muf
()
+
fvc
::
interpolate
(
rho
*
turbulence
->
nut
());
+
fvc
::
interpolate
(
rho
*
turbulence
->
nut
())
);
fvVectorMatrix
UEqn
(
fvm
::
ddt
(
rho
,
U
)
+
fvm
::
div
(
rhoPhi
,
U
)
-
fvm
::
laplacian
(
muf
,
U
)
-
(
fvc
::
grad
(
U
)
&
fvc
::
grad
(
muf
))
-
fvm
::
laplacian
(
mu
Ef
f
,
U
)
-
(
fvc
::
grad
(
U
)
&
fvc
::
grad
(
mu
Ef
f
))
//- fvc::div(muf*(mesh.Sf() & fvc::interpolate(fvc::grad(U)().T())))
);
...
...
applications/solvers/multiphase/compressibleInterDyMFoam/alphaEqnsSubCycle.H
View file @
499d0b4f
...
...
@@ -12,7 +12,9 @@
surfaceScalarField
phic
=
mag
(
phi
/
mesh
.
magSf
());
phic
=
min
(
interface
.
cAlpha
()
*
phic
,
max
(
phic
));
fvc
::
makeAbsolute
(
phi
,
U
);
volScalarField
divU
=
fvc
::
div
(
phi
);
fvc
::
makeRelative
(
phi
,
U
);
if
(
nAlphaSubCycles
>
1
)
{
...
...
applications/solvers/multiphase/compressibleInterDyMFoam/pEqn.H
View file @
499d0b4f
...
...
@@ -30,7 +30,7 @@
-
ghf
*
fvc
::
snGrad
(
rho
)
)
*
rUAf
*
mesh
.
magSf
();
for
(
int
nonOrth
=
0
;
nonOrth
<=
nNonOrthCorr
;
nonOrth
++
)
for
(
int
nonOrth
=
0
;
nonOrth
<=
nNonOrthCorr
;
nonOrth
++
)
{
fvScalarMatrix
pdEqnIncomp
(
...
...
@@ -38,15 +38,36 @@
-
fvm
::
laplacian
(
rUAf
,
pd
)
);
solve
if
(
oCorr
==
nOuterCorr
-
1
&&
corr
==
nCorr
-
1
&&
nonOrth
==
nNonOrthCorr
)
{
solve
(
max
(
alpha1
,
scalar
(
0
))
*
(
psi1
/
rho1
)
+
max
(
alpha2
,
scalar
(
0
))
*
(
psi2
/
rho2
)
)
*
pdEqnComp
()
+
pdEqnIncomp
);
(
max
(
alpha1
,
scalar
(
0
))
*
(
psi1
/
rho1
)
+
max
(
alpha2
,
scalar
(
0
))
*
(
psi2
/
rho2
)
)
*
pdEqnComp
()
+
pdEqnIncomp
,
mesh
.
solver
(
pd
.
name
()
+
"Final"
)
);
}
else
{
solve
(
(
max
(
alpha1
,
scalar
(
0
))
*
(
psi1
/
rho1
)
+
max
(
alpha2
,
scalar
(
0
))
*
(
psi2
/
rho2
)
)
*
pdEqnComp
()
+
pdEqnIncomp
);
}
if
(
nonOrth
==
nNonOrthCorr
)
{
...
...
@@ -62,7 +83,8 @@
p
=
max
(
(
pd
+
gh
*
(
alpha1
*
rho10
+
alpha2
*
rho20
))
/
(
1
.
0
-
gh
*
(
alpha1
*
psi1
+
alpha2
*
psi2
)),
(
pd
+
gh
*
(
alpha1
*
rho10
+
alpha2
*
rho20
))
/
(
1
.
0
-
gh
*
(
alpha1
*
psi1
+
alpha2
*
psi2
)),
pMin
);
...
...
applications/solvers/multiphase/interPhaseChangeFoam/UEqn.H
View file @
499d0b4f
surfaceScalarField
muf
=
surfaceScalarField
muEff
(
"muEff"
,
twoPhaseProperties
->
muf
()
+
fvc
::
interpolate
(
rho
*
turbulence
->
nut
());
+
fvc
::
interpolate
(
rho
*
turbulence
->
nut
())
);
fvVectorMatrix
UEqn
(
fvm
::
ddt
(
rho
,
U
)
+
fvm
::
div
(
rhoPhi
,
U
)
-
fvm
::
Sp
(
fvc
::
ddt
(
rho
)
+
fvc
::
div
(
rhoPhi
),
U
)
-
fvm
::
laplacian
(
muf
,
U
)
-
(
fvc
::
grad
(
U
)
&
fvc
::
grad
(
muf
))
//- fvc::div(muf*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf()))
-
fvm
::
laplacian
(
mu
Ef
f
,
U
)
-
(
fvc
::
grad
(
U
)
&
fvc
::
grad
(
mu
Ef
f
))
//- fvc::div(mu
Ef
f*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf()))
);
UEqn
.
relax
();
...
...
src/Allwmake
View file @
499d0b4f
...
...
@@ -2,8 +2,8 @@
cd
${
0
%/*
}
||
exit
1
# run from this directory
set
-x
#
force
update
of
Foam::FOAMversion string
(git tag or $WM_PROJECT_VERSION)
/bin/rm
-f
OpenFOAM/Make/
$WM_OPTIONS
/global.? 2>/dev/null
# update Foam::FOAMversion string
if required
wmakePrintBuild
-check
||
/bin/rm
-f
OpenFOAM/Make/
$WM_OPTIONS
/global.? 2>/dev/null
wmakeLnInclude
-f
OpenFOAM
wmakeLnInclude
-f
OSspecific/
$WM_OS
...
...
src/OpenFOAM/global/global.Cver
View file @
499d0b4f
...
...
@@ -23,20 +23,19 @@ License
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
Define the globals used in the FOAM library.
It is important that these
are constructed in the appropriate order to
avoid the use of unconstructed
data in the global namespace.
Define the globals used in the
Open
FOAM library.
It is important that these
are constructed in the appropriate order to
avoid the use of unconstructed
data in the global namespace.
This file has the extension .ver to force it to be parsed by the script
which converts WM_PROJECT_VERSION into the appropriate version number
string.
This file has the extension .Cver to trigger a Makefile rule that converts
WM_PROJECT_VERSION into the appropriate version string.
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "foamVersion.H"
const char* const Foam::FOAMversion = WM_PROJECT_VERSION;
const char* const Foam::FOAMversion =
"
WM_PROJECT_VERSION
"
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Setup an error handler for the global new operator
...
...
@@ -51,7 +50,7 @@ const char* const Foam::FOAMversion = WM_PROJECT_VERSION;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "JobInfo.H"
bool Foam::JobInfo::constructed
=
false;
bool Foam::JobInfo::constructed
(
false
)
;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Global error definitions (initialised by construction)
...
...
src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
View file @
499d0b4f
...
...
@@ -175,9 +175,8 @@ void turbulentInletFvPatchField<Type>::updateCoeffs()
ranGen_
.
randomise
(
randomField
[
facei
]);
}
// Correction-factor proposed by Yi Wang to compensate for the loss
// of RMS fluctuation due to the temporal correlation introduced by
// the alpha parameter.
// Correction-factor to compensate for the loss of RMS fluctuation
// due to the temporal correlation introduced by the alpha parameter.
scalar
rmsCorr
=
sqrt
(
12
*
(
2
*
alpha_
-
sqr
(
alpha_
)))
/
alpha_
;
patchField
=
...
...
@@ -206,6 +205,7 @@ void turbulentInletFvPatchField<Type>::write(Ostream& os) const
os
.
writeKeyword
(
"fluctuationScale"
)
<<
fluctuationScale_
<<
token
::
END_STATEMENT
<<
nl
;
referenceField_
.
writeEntry
(
"referenceField"
,
os
);
os
.
writeKeyword
(
"alpha"
)
<<
alpha_
<<
token
::
END_STATEMENT
<<
nl
;
this
->
writeEntry
(
"value"
,
os
);
}
...
...
src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H
View file @
499d0b4f
...
...
@@ -63,7 +63,6 @@ class turbulentInletFvPatchField
:
public
fixedValueFvPatchField
<
Type
>
{
// Private data
Random
ranGen_
;
...
...
src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C
View file @
499d0b4f
...
...
@@ -35,65 +35,6 @@ License
// * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * //
template
<
class
ParcelType
>
void
Foam
::
KinematicCloud
<
ParcelType
>::
setInjectorCellAndPosition
(
label
&
pCell
,
vector
&
pPosition
)
{
const
vector
originalPosition
=
pPosition
;
bool
foundCell
=
false
;
pCell
=
mesh_
.
findCell
(
pPosition
);
if
(
pCell
>=
0
)
{
const
vector
&
C
=
mesh_
.
C
()[
pCell
];
pPosition
+=
1.0e-6
*
(
C
-
pPosition
);
foundCell
=
mesh_
.
pointInCell
(
pPosition
,
pCell
);
}
reduce
(
foundCell
,
orOp
<
bool
>
());
// Last chance - find nearest cell and try that one
// - the point is probably on an edge
if
(
!
foundCell
)
{
pCell
=
mesh_
.
findNearestCell
(
pPosition
);
if
(
pCell
>=
0
)
{
const
vector
&
C
=
mesh_
.
C
()[
pCell
];
pPosition
+=
1.0e-6
*
(
C
-
pPosition
);
foundCell
=
mesh_
.
pointInCell
(
pPosition
,
pCell
);
}
reduce
(
foundCell
,
orOp
<
bool
>
());
}
if
(
!
foundCell
)
{
FatalErrorIn
(
"void KinematicCloud<ParcelType>::findInjectorCell"
"(label&, vector&)"
)
<<
"Cannot find parcel injection cell. "
<<
"Parcel position = "
<<
originalPosition
<<
nl
<<
abort
(
FatalError
);
}
}
template
<
class
ParcelType
>
Foam
::
scalar
Foam
::
KinematicCloud
<
ParcelType
>::
setNumberOfParticles
(
...
...
@@ -324,7 +265,7 @@ void Foam::KinematicCloud<ParcelType>::evolve()
g_
.
value
()
);
inject
(
td
);
inject
();
if
(
coupled_
)
{
...
...
@@ -336,15 +277,11 @@ void Foam::KinematicCloud<ParcelType>::evolve()
template
<
class
ParcelType
>
template
<
class
TrackingData
>
void
Foam
::
KinematicCloud
<
ParcelType
>::
inject
(
TrackingData
&
td
)
void
Foam
::
KinematicCloud
<
ParcelType
>::
inject
()
{
scalar
time
=
this
->
db
().
time
().
value
();
scalar
pRho
=
td
.
constProps
()
.
rho0
();
scalar
pRho
=
constProps
_
.
rho0
();
this
->
injection
().
prepareForNextTimeStep
(
time0_
,
time
);
...
...
@@ -419,21 +356,21 @@ void Foam::KinematicCloud<ParcelType>::inject
// Determine the injection cell
label
pCell
=
-
1
;
set
InjectorCellAndPosition
(
pCell
,
pPosition
);
this
->
injection
().
find
InjectorCellAndPosition
(
pCell
,
pPosition
);
if
(
pCell
>=
0
)
{
// construct the parcel that is to be injected
ParcelType
*
pPtr
=
new
ParcelType
(
td
.
cloud
()
,
*
this
,
parcelTypeId_
,
pPosition
,
pCell
,
pDiameter
,
pU
,
pNumberOfParticles
,
td
.
constProps
()
constProps
_
);
scalar
dt
=
time
-
timeInj
;
...
...
@@ -441,7 +378,7 @@ void Foam::KinematicCloud<ParcelType>::inject
pPtr
->
stepFraction
()
=
(
this
->
db
().
time
().
deltaT
().
value
()
-
dt
)
/
this
->
time
().
deltaT
().
value
();
this
->
injectParcel
(
td
,
pPtr
);
this
->
injectParcel
(
pPtr
);
}
}
...
...
@@ -455,12 +392,7 @@ void Foam::KinematicCloud<ParcelType>::inject
template
<
class
ParcelType
>
template
<
class
TrackingData
>
void
Foam
::
KinematicCloud
<
ParcelType
>::
injectParcel
(
TrackingData
&
td
,
ParcelType
*
p
)
void
Foam
::
KinematicCloud
<
ParcelType
>::
injectParcel
(
ParcelType
*
p
)
{
addParticle
(
p
);
nParcelsAdded_
++
;
...
...
src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H
View file @
499d0b4f
...
...
@@ -223,13 +223,6 @@ protected:
// Protected member functions
//- Set parcel position and cell into which parcel is introduced
void
setInjectorCellAndPosition
(
label
&
pCell
,
vector
&
pPosition
);
//- Set the number of particles per parcel
scalar
setNumberOfParticles
(
...
...
@@ -241,16 +234,10 @@ protected:
);
//- Inject more parcels
template
<
class
TrackingData
>
void
inject
(
TrackingData
&
td
);
void
inject
();
//- Inject parcel if it is valid - delete otherwise
template
<
class
TrackingData
>
void
injectParcel
(
TrackingData
&
td
,
ParcelType
*
p
);
void
injectParcel
(
ParcelType
*
p
);
//- Post-injection checks
void
postInjectCheck
();
...
...
src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C
View file @
499d0b4f
...
...
@@ -174,7 +174,7 @@ void Foam::ReactingCloud<ParcelType>::evolve()
this
->
g
().
value
()
);
inject
(
td
);
inject
();
if
(
this
->
coupled
())
{
...
...
@@ -186,15 +186,11 @@ void Foam::ReactingCloud<ParcelType>::evolve()
template
<
class
ParcelType
>
template
<
class
TrackingData
>
void
Foam
::
ReactingCloud
<
ParcelType
>::
inject
(
TrackingData
&
td
)
void
Foam
::
ReactingCloud
<
ParcelType
>::
inject
()
{
scalar
time
=
this
->
db
().
time
().
value
();
scalar
pRho
=
t
d
.
constProps
().
rho0
();
scalar
pRho
=
t
his
->
constProps
().
rho0
();
this
->
injection
().
prepareForNextTimeStep
(
this
->
time0
(),
time
);
...
...
@@ -269,14 +265,14 @@ void Foam::ReactingCloud<ParcelType>::inject
// Determine the injection cell
label
pCell
=
-
1
;
this
->
set
InjectorCellAndPosition
(
pCell
,
pPosition
);
this
->
injection
().
find
InjectorCellAndPosition
(
pCell
,
pPosition
);
if
(
pCell
>=
0
)
{
// construct the parcel that is to be injected
ParcelType
*
pPtr
=
new
ParcelType
(
td
.
cloud
()
,
*
this
,
this
->
parcelTypeId
(),
pPosition
,
pCell
,
...
...
@@ -287,7 +283,7 @@ void Foam::ReactingCloud<ParcelType>::inject
composition
().
YLiquid0
(),
composition
().
YSolid0
(),
composition
().
YMixture0
(),
t
d
.
constProps
()
t
his
->
constProps
()
);
scalar
dt
=
time
-
timeInj
;
...
...
@@ -295,7 +291,7 @@ void Foam::ReactingCloud<ParcelType>::inject
pPtr
->
stepFraction
()
=
(
this
->
db
().
time
().
deltaT
().
value
()
-
dt
)
/
this
->
db
().
time
().
deltaT
().
value
();
this
->
injectParcel
(
td
,
pPtr
);
this
->
injectParcel
(
pPtr
);
}
}
...
...
src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H
View file @
499d0b4f
...
...
@@ -117,8 +117,7 @@ class ReactingCloud
protected:
//- Inject more parcels
template
<
class
TrackingData
>
void
inject
(
TrackingData
&
td
);
void
inject
();
public:
...
...
src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C
View file @
499d0b4f
...
...
@@ -159,6 +159,57 @@ void Foam::InjectionModel<CloudType>::prepareForNextTimeStep
}
template
<
class
CloudType
>
void
Foam
::
InjectionModel
<
CloudType
>::
findInjectorCellAndPosition
(
label
&
cellI
,
vector
&
position
)
{
const
vector
p0
=
position
;
bool
foundCell
=
false
;
cellI
=
owner_
.
mesh
().
findCell
(
position
);
if
(
cellI
>=
0
)
{
const
vector
&
C
=
owner_
.
mesh
().
C
()[
cellI
];
position
+=
1.0e-6
*
(
C
-
position
);
foundCell
=
owner_
.
mesh
().
pointInCell
(
position
,
cellI
);
}
reduce
(
foundCell
,
orOp
<
bool
>
());
// Last chance - find nearest cell and try that one
// - the point is probably on an edge
if
(
!
foundCell
)
{
cellI
=
owner_
.
mesh
().
findNearestCell
(
position
);
if
(
cellI
>=
0
)
{
const
vector
&
C
=
owner_
.
mesh
().
C
()[
cellI
];
position
+=
1.0e-6
*
(
C
-
position
);
foundCell
=
owner_
.
mesh
().
pointInCell
(
position
,
cellI
);
}
reduce
(
foundCell
,
orOp
<
bool
>
());
}
if
(
!
foundCell
)
{
FatalErrorIn
(
"InjectionModel<CloudType>::setInjectorCellAndPosition"
"(label&, vector&)"
)
<<
"Cannot find parcel injection cell. "
<<
"Parcel position = "
<<
p0
<<
nl
<<
abort
(
FatalError
);
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include
"NewInjectionModel.C"
...
...
src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H
View file @
499d0b4f
...
...
@@ -208,6 +208,14 @@ public:
// Injection geometry
//- Find the cell that contains the injector position
// Will modify position slightly towards the owner cell centroid
virtual
void
findInjectorCellAndPosition
(
label
&
cellI
,
vector
&
position
);
//- Return the injection position
virtual
vector
position
(
...
...
src/postProcessing/Allwmake
View file @
499d0b4f
...
...
@@ -3,10 +3,8 @@ cd ${0%/*} || exit 1 # run from this directory
set
-x
wmake libo postCalc
wmake libso forces
wmake libso fieldAverage
wmake libso foamCalcFunctions
wmake libso minMaxFields
wmake libso systemCall
(
cd
functionObjects
&&
./Allwmake
)
# ----------------------------------------------------------------- end-of-file
src/postProcessing/functionObjects/Allwmake
0 → 100755
View file @
499d0b4f
#!/bin/sh
cd
${
0
%/*
}
||
exit
1
# run from this directory
set
-x
wmake libso fieldAverage
wmake libso forces
wmake libso minMaxFields
wmake libso systemCall
# ----------------------------------------------------------------- end-of-file
src/postProcessing/fieldAverage/Make/files
→
src/postProcessing/
functionObjects/
fieldAverage/Make/files
View file @
499d0b4f
File moved
src/postProcessing/fieldAverage/Make/options
→
src/postProcessing/
functionObjects/
fieldAverage/Make/options
View file @
499d0b4f
File moved
Prev
1
2
3
4
5
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