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
a8c917fd
Commit
a8c917fd
authored
Dec 11, 2013
by
Henry
Browse files
DyM solvers: correct Uf using phi after construction
parent
1c9fbf69
Changes
13
Hide whitespace changes
Inline
Side-by-side
applications/solvers/combustion/engineFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -91,10 +91,7 @@ K = 0.5*magSqr(U);
{
rhoUf
=
fvc
::
interpolate
(
rho
*
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
rhoUf
+=
mesh
.
Sf
()
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
-
(
mesh
.
Sf
()
&
rhoUf
))
/
sqr
(
mesh
.
magSf
());
rhoUf
+=
n
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
/
mesh
.
magSf
()
-
(
n
&
rhoUf
));
}
if
(
thermo
.
dpdt
())
...
...
applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -107,10 +107,7 @@ K = 0.5*magSqr(U);
{
rhoUf
=
fvc
::
interpolate
(
rho
*
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
rhoUf
+=
mesh
.
Sf
()
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
-
(
mesh
.
Sf
()
&
rhoUf
))
/
sqr
(
mesh
.
magSf
());
rhoUf
+=
n
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
/
mesh
.
magSf
()
-
(
n
&
rhoUf
));
}
if
(
thermo
.
dpdt
())
...
...
applications/solvers/compressible/sonicFoam/sonicDyMFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -42,8 +42,5 @@ U.correctBoundaryConditions();
{
rhoUf
=
fvc
::
interpolate
(
rho
*
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
rhoUf
+=
mesh
.
Sf
()
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
-
(
mesh
.
Sf
()
&
rhoUf
))
/
sqr
(
mesh
.
magSf
());
rhoUf
+=
n
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
/
mesh
.
magSf
()
-
(
n
&
rhoUf
));
}
applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -51,7 +51,7 @@ fvOptions.correct(U);
{
Uf
=
fvc
::
interpolate
(
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
Uf
+=
mesh
.
Sf
()
*
(
phi
-
(
mesh
.
Sf
()
&
Uf
))
/
sqr
(
mesh
.
magSf
(
));
Uf
+=
n
*
(
phi
/
mesh
.
mag
Sf
()
-
(
n
&
Uf
));
}
// Make the fluxes relative to the mesh motion
...
...
applications/solvers/lagrangian/sprayFoam/sprayEngineFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -93,10 +93,7 @@ K = 0.5*magSqr(U);
{
rhoUf
=
fvc
::
interpolate
(
rho
*
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
rhoUf
+=
mesh
.
Sf
()
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
-
(
mesh
.
Sf
()
&
rhoUf
))
/
sqr
(
mesh
.
magSf
());
rhoUf
+=
n
*
(
fvc
::
absolute
(
phi
,
rho
,
U
)
/
mesh
.
magSf
()
-
(
n
&
rhoUf
));
}
if
(
thermo
.
dpdt
())
...
...
applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -85,6 +85,6 @@
{
Uf
=
fvc
::
interpolate
(
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
Uf
+=
mesh
.
Sf
()
*
(
phiv
-
(
mesh
.
Sf
()
&
Uf
))
/
sqr
(
mesh
.
magSf
(
));
Uf
+=
n
*
(
phiv
/
mesh
.
mag
Sf
()
-
(
n
&
Uf
));
}
}
applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -114,7 +114,7 @@
{
Uf
=
fvc
::
interpolate
(
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
Uf
+=
mesh
.
Sf
()
*
(
phi
-
(
mesh
.
Sf
()
&
Uf
))
/
sqr
(
mesh
.
magSf
(
));
Uf
+=
n
*
(
phi
/
mesh
.
mag
Sf
()
-
(
n
&
Uf
));
}
// Make the fluxes relative to the mesh motion
...
...
applications/solvers/multiphase/interFoam/interDyMFoam/interDyMFoam.C
View file @
a8c917fd
...
...
@@ -55,10 +55,10 @@ int main(int argc, char *argv[])
pimpleControl
pimple
(
mesh
);
#include
"createFields.H"
#include
"createUf.H"
#include
"readTimeControls.H"
#include
"createPrghCorrTypes.H"
#include
"correctPhi.H"
#include
"createUf.H"
#include
"CourantNo.H"
#include
"setInitialDeltaT.H"
...
...
applications/solvers/multiphase/interFoam/interDyMFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -67,7 +67,7 @@
{
Uf
=
fvc
::
interpolate
(
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
Uf
+=
mesh
.
Sf
()
*
(
phi
-
(
mesh
.
Sf
()
&
Uf
))
/
sqr
(
mesh
.
magSf
(
));
Uf
+=
n
*
(
phi
/
mesh
.
mag
Sf
()
-
(
n
&
Uf
));
}
// Make the fluxes relative to the mesh motion
...
...
applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C
View file @
a8c917fd
...
...
@@ -65,10 +65,10 @@ int main(int argc, char *argv[])
pimpleControl
pimple
(
mesh
);
#include
"createFields.H"
#include
"createUf.H"
#include
"readTimeControls.H"
#include
"createPcorrTypes.H"
#include
"../interFoam/interDyMFoam/correctPhi.H"
#include
"createUf.H"
#include
"CourantNo.H"
#include
"setInitialDeltaT.H"
...
...
applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/pEqn.H
View file @
a8c917fd
...
...
@@ -68,7 +68,7 @@
{
Uf
=
fvc
::
interpolate
(
U
);
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
Uf
+=
mesh
.
Sf
()
*
(
phi
-
(
mesh
.
Sf
()
&
Uf
))
/
sqr
(
mesh
.
magSf
(
));
Uf
+=
n
*
(
phi
/
mesh
.
mag
Sf
()
-
(
n
&
Uf
));
}
// Make the fluxes relative to the mesh motion
...
...
src/finiteVolume/cfdTools/compressible/createRhoUf.H
View file @
a8c917fd
...
...
@@ -46,9 +46,14 @@ surfaceVectorField rhoUf
IOobject
::
READ_IF_PRESENT
,
IOobject
::
AUTO_WRITE
),
linearI
nterpolate
(
rho
*
U
)
fvc
::
i
nterpolate
(
rho
*
U
)
);
{
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
rhoUf
+=
n
*
(
phi
/
mesh
.
magSf
()
-
(
n
&
rhoUf
));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
...
...
src/finiteVolume/cfdTools/incompressible/createUf.H
View file @
a8c917fd
...
...
@@ -46,9 +46,15 @@ surfaceVectorField Uf
IOobject
::
READ_IF_PRESENT
,
IOobject
::
AUTO_WRITE
),
linearI
nterpolate
(
U
)
fvc
::
i
nterpolate
(
U
)
);
{
surfaceVectorField
n
(
mesh
.
Sf
()
/
mesh
.
magSf
());
Uf
+=
n
*
(
phi
/
mesh
.
magSf
()
-
(
n
&
Uf
));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
...
...
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