File tree Expand file tree Collapse file tree
applications/birdmultiphaseEulerFoam/functionObjects/disengagement
tutorial_cases/disengagement/bubble_column_pbe_20L/system Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,8 +164,10 @@ bool Foam::functionObjects::disengagement::execute()
164164
165165 phase_com_mean_long /= deltat_long ;
166166 phase_com_mean_short /= deltat_short ;
167+
168+ if (phase_com_mean_long < 1e-16 ) return true;
167169
168- if (mag (phase_com_mean_long - phase_com_mean_short ) < tolerance_ )
170+ if (mag (phase_com_mean_long - phase_com_mean_short )/ phase_com_mean_long < tolerance_ )
169171 {
170172 if (!disengaged_ )
171173 {
@@ -179,10 +181,10 @@ bool Foam::functionObjects::disengagement::execute()
179181
180182 label patchI = mesh_ .boundaryMesh ().findPatchID (inletPatch_ );
181183
182- volVectorField :: Boundary & UBf = const_cast < volVectorField :: Boundary & > (U .boundaryFieldRef ());
184+ fvPatchVectorField & UBf = const_cast < fvPatchVectorField & > (U .boundaryFieldRef ()[ patchI ] );
183185
184186 //- Stop the flow from entering
185- UBf [patchI ] = vector (0 ,0 ,0 );
187+ UBf [patchI ] == vector (0 ,0 ,0 );
186188
187189 }
188190
Original file line number Diff line number Diff line change @@ -26,12 +26,48 @@ Class
2626
2727Description
2828 This functionObject disengages (i.e., sets the inlet velocity to zero)
29- upon reaching a steady holdup.
29+ upon reaching a steady value for the phase center of mass.
30+
31+ Steady state is computed by comparing the average center of mass from
32+ the previous "2*nsamples" samples against the previous "samples" samples
33+ (see input below). If the relative difference falls below a user-defined
34+ tolerance, steady stated is decleared.
35+
36+ Example of function object specification:
37+ \verbatim
38+ disengagement
39+ {
40+ type disengagement;
41+ libs ("libbirdmultiphaseEulerFoamFunctionObjects.so");
42+
43+ //- Properties common to all functionObjects
44+ executeControl runTime;
45+ executeInterval 0.01;
46+ writeControl runTime;
47+ writeInterval 0.1;
48+
49+ //- Properties specific of this functionobject
50+ phase liquid;
51+ inletPhase gas;
52+ inlet inlet;
53+ tolerance 1e-2;
54+ direction (0 1 0);
55+ nsamples 50;
56+ disengage true;
57+ }
58+ \endverbatim
3059
3160Usage
3261 \table
3362 Property | Description | Required | Default value
3463 type | type name: disengagement | yes |
64+ phase | name of the phase for computing the center of mass | yes |
65+ inletPhase | name of the phase you want to disengage | yes |
66+ inlet | name of the inlet patch | yes |
67+ tolerance | relative difference to declare disengagement | yes |
68+ direction | normally the direction of gravity | yes |
69+ nsamples | number of samples for averaging | yes |
70+ disengage | set false for disabling disengaging | yes |
3571 \endtable
3672
3773See also
Original file line number Diff line number Diff line change @@ -53,28 +53,27 @@ maxDeltaT 0.0005;
5353
5454functions
5555{
56-
57- // #includeFunc writeObjects(d.gas)
58- // #includeFunc writeObjects(thermo:rho.gas)
59- // #includeFunc writeObjects(thermo:rho.liquid)
60-
6156 disengagement
6257 {
63- type disengagement;
64- libs (" libbirdmultiphaseEulerFoamFunctionObjects.so" );
65- writeControl timeStep;
66- writeInterval 100 ;
67- phase gas;
68- inlet inlet;
69- tolerance 1e-2 ;
70- nsamples 100 ;
71-
58+ type disengagement;
59+ libs (" libbirdmultiphaseEulerFoamFunctionObjects.so" );
60+
61+ // - Properties common to all functionObjects
62+ executeControl runTime;
63+ executeInterval 0.01 ;
64+ writeControl runTime;
65+ writeInterval 0.1 ;
66+
67+ // - Properties specific of this functionobject
68+ phase liquid;
69+ inletPhase gas;
70+ inlet inlet;
71+ tolerance 1e-2 ;
72+ direction (0 1 0 );
73+ nsamples 50 ;
74+ disengage true ;
7275 }
7376}
74- // functions
75- // {
76- // #includeFunc fieldAverage(U.air, U.water, alpha.air, p)
77- // }
7877
7978
8079// ************************************************************************* //
You can’t perform that action at this time.
0 commit comments