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-plus
Commits
e8e0c997
Commit
e8e0c997
authored
Feb 16, 2015
by
Henry
Browse files
DyM solvers: rationalized handling of time update
parent
74990ee9
Changes
3
Hide whitespace changes
Inline
Side-by-side
applications/solvers/compressible/rhoPimpleFoam/rhoPimpleDyMFoam/rhoPimpleDyMFoam.C
View file @
e8e0c997
...
...
@@ -70,18 +70,20 @@ int main(int argc, char *argv[])
while
(
runTime
.
run
())
{
#include "readControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
{
// Store divrhoU from the previous time-step/mesh for the correctPhi
// Store divrhoU from the previous mesh so that it can be mapped
// and used in correctPhi to ensure the corrected phi has the
// same divergence
volScalarField
divrhoU
(
"divrhoU"
,
fvc
::
div
(
fvc
::
absolute
(
phi
,
rho
,
U
))
);
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime
++
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
...
...
applications/solvers/compressible/sonicFoam/sonicDyMFoam/sonicDyMFoam.C
View file @
e8e0c997
...
...
@@ -66,18 +66,20 @@ int main(int argc, char *argv[])
while
(
runTime
.
run
())
{
#include "readControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
{
// Store divrhoU from the previous time-step/mesh for the correctPhi
// Store divrhoU from the previous mesh so that it can be mapped
// and used in correctPhi to ensure the corrected phi has the
// same divergence
volScalarField
divrhoU
(
"divrhoU"
,
fvc
::
div
(
fvc
::
absolute
(
phi
,
rho
,
U
))
);
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime
++
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
...
...
applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/cavitatingDyMFoam.C
View file @
e8e0c997
...
...
@@ -67,24 +67,19 @@ int main(int argc, char *argv[])
while
(
runTime
.
run
())
{
#include "readControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime
++
;
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
{
#include "CourantNo.H"
#include "setDeltaT.H"
scalar
timeBeforeMeshUpdate
=
runTime
.
elapsedCpuTime
()
;
runTime
++
;
// Do any mesh changes
mesh
.
update
();
Info
<<
"Time = "
<<
runTime
.
timeName
()
<<
nl
<<
endl
;
if
(
mesh
.
changing
())
{
Info
<<
"Execution time for mesh.update() = "
<<
runTime
.
elapsedCpuTime
()
-
timeBeforeMeshUpdate
<<
" s"
<<
endl
;
// Do any mesh changes
mesh
.
update
();
if
(
correctPhi
)
if
(
mesh
.
changing
()
&&
correctPhi
)
{
// Calculate absolute flux from the mapped surface velocity
phi
=
mesh
.
Sf
()
&
Uf
;
...
...
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