Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
216f0a0c
Commit
216f0a0c
authored
Oct 11, 2010
by
Henry
Browse files
pimpleDyMFoam: Corrected caching of rUA/rAU
parent
bbecb950
Changes
7
Hide whitespace changes
Inline
Side-by-side
applications/solvers/incompressible/pimpleFoam/UEqn.H
View file @
216f0a0c
...
...
@@ -9,7 +9,7 @@ tmp<fvVectorMatrix> UEqn
UEqn
().
relax
();
volScalarField
r
U
A
=
1
.
0
/
UEqn
().
A
();
volScalarField
rA
U
=
1
.
0
/
UEqn
().
A
();
if
(
momentumPredictor
)
{
...
...
@@ -17,6 +17,6 @@ if (momentumPredictor)
}
else
{
U
=
r
U
A
*
(
UEqn
().
H
()
-
fvc
::
grad
(
p
));
U
=
rA
U
*
(
UEqn
().
H
()
-
fvc
::
grad
(
p
));
U
.
correctBoundaryConditions
();
}
applications/solvers/incompressible/pimpleFoam/pEqn.H
View file @
216f0a0c
U
=
r
U
A
*
UEqn
().
H
();
U
=
rA
U
*
UEqn
().
H
();
if
(
nCorr
<=
1
)
{
...
...
@@ -6,7 +6,7 @@ if (nCorr <= 1)
}
phi
=
(
fvc
::
interpolate
(
U
)
&
mesh
.
Sf
())
+
fvc
::
ddtPhiCorr
(
r
U
A
,
U
,
phi
);
+
fvc
::
ddtPhiCorr
(
rA
U
,
U
,
phi
);
adjustPhi
(
phi
,
U
,
p
);
...
...
@@ -16,7 +16,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
// Pressure corrector
fvScalarMatrix
pEqn
(
fvm
::
laplacian
(
r
U
A
,
p
)
==
fvc
::
div
(
phi
)
fvm
::
laplacian
(
rA
U
,
p
)
==
fvc
::
div
(
phi
)
);
pEqn
.
setReference
(
pRefCell
,
pRefValue
);
...
...
@@ -47,5 +47,5 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
// Explicitly relax pressure for momentum corrector
p
.
relax
();
U
-=
r
U
A
*
fvc
::
grad
(
p
);
U
-=
rA
U
*
fvc
::
grad
(
p
);
U
.
correctBoundaryConditions
();
applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/createFields.H
View file @
216f0a0c
...
...
@@ -27,7 +27,7 @@
mesh
);
#
include "createPhi.H"
#
include "createPhi.H"
label
pRefCell
=
0
;
...
...
applications/solvers/incompressible/pimpleFoam/pimpleDyMFoam/pEqn.H
View file @
216f0a0c
...
...
@@ -46,6 +46,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
#include "continuityErrs.H"
// Explicitly relax pressure for momentum corrector
p
.
relax
();
// Make the fluxes relative to the mesh motion
...
...
tutorials/incompressible/pimpleDyMFoam/movingCone/0/U
View file @
216f0a0c
...
...
@@ -20,47 +20,47 @@ internalField uniform (0 0 0);
boundaryField
{
movingWall
movingWall
{
type fixedValue;
value uniform (1 0 0);
}
farFieldMoving
farFieldMoving
{
type fixedValue;
value uniform (0 0 0);
}
fixedWall
fixedWall
{
type fixedValue;
value uniform (0 0 0);
}
axis
axis
{
type symmetryPlane;
}
left
left
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
farField
farField
{
type fixedValue;
value uniform (0 0 0);
}
back
back
{
type wedge;
}
front
front
{
type wedge;
}
...
...
tutorials/incompressible/pimpleDyMFoam/movingCone/0/p
View file @
216f0a0c
...
...
@@ -20,27 +20,27 @@ internalField uniform 0;
boundaryField
{
movingWall
movingWall
{
type zeroGradient;
}
farFieldMoving
farFieldMoving
{
type zeroGradient;
}
fixedWall
fixedWall
{
type zeroGradient;
}
axis
axis
{
type symmetryPlane;
}
left
left
{
type totalPressure;
p0 uniform 0;
...
...
@@ -52,17 +52,17 @@ boundaryField
value uniform 0;
}
farField
farField
{
type zeroGradient;
}
back
back
{
type wedge;
}
front
front
{
type wedge;
}
...
...
tutorials/incompressible/pimpleDyMFoam/movingCone/system/fvSolution
View file @
216f0a0c
...
...
@@ -21,7 +21,7 @@ solvers
{
solver PCG;
preconditioner DIC;
tolerance 0.0
1
;
tolerance 0.0
2
;
relTol 0;
}
...
...
@@ -30,7 +30,7 @@ solvers
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.0
5
;
relTol 0.0
1
;
}
pFinal
...
...
@@ -66,10 +66,16 @@ solvers
PIMPLE
{
correctPhi yes;
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
U 1;
UFinal 1;
}
// ************************************************************************* //
Write
Preview
Markdown
is supported
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