File tree Expand file tree Collapse file tree
applications/solvers/additiveFoam Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,8 +94,6 @@ int main(int argc, char *argv[])
9494
9595 while (runTime .run ())
9696 {
97- #include "updateProperties.H"
98-
9997 #include "readDyMControls.H"
10098 #include "CourantNo.H"
10199 #include "setDeltaT.H"
@@ -104,6 +102,22 @@ int main(int argc, char *argv[])
104102
105103 mesh .update ();
106104
105+ if (mesh .topoChanged ())
106+ {
107+ // Temperature is authoritative after topology changes. A
108+ // conservative scheme should consider enthalpy as authoritative.
109+ forAll (mesh .cells (), cellI )
110+ {
111+ scalar alpha1_ =
112+ interpolateXY (T [cellI ], thermo .x (), thermo .y ());
113+ alpha1 [cellI ] = min (max (alpha1_ , 0.0 ), 1.0 );
114+ }
115+
116+ alpha1 .correctBoundaryConditions ();
117+
118+ #include "updateProperties.H"
119+ }
120+
107121 runTime ++ ;
108122
109123 Info << "Time = " << runTime .name () << nl << endl ;
@@ -123,6 +137,8 @@ int main(int argc, char *argv[])
123137
124138 #include "thermo/TEqn.H"
125139
140+ #include "updateProperties.H"
141+
126142 runTime .write ();
127143
128144 Info << "ExecutionTime = " << runTime .elapsedCpuTime () << " s"
Original file line number Diff line number Diff line change 1+ alpha3 *= pos0 (solidus - T );
2+ alpha3 .correctBoundaryConditions ();
3+
14forAll (mesh .cells (), cellI )
25{
3- // update phase fractions
46 scalar alpha1_ = alpha1 [cellI ];
57 scalar alpha2_ = 1.0 - alpha1 [cellI ];
6-
7- if (alpha1_ < 1.0 )
8- {
9- alpha3 [cellI ] = 0.0 ;
10- }
118 scalar alpha3_ = alpha3 [cellI ];
129
1310 // update temperature ranges for phase properties
@@ -24,6 +21,5 @@ forAll(mesh.cells(), cellI)
2421 + alpha3_ * Cp3 .value (T1 );
2522}
2623
27- alpha3 .correctBoundaryConditions ();
2824Cp .correctBoundaryConditions ();
2925kappa .correctBoundaryConditions ();
You can’t perform that action at this time.
0 commit comments