GroovyBC problem in the defining inlet velocity
Hello, every one!
As defining inlet velocity of a two-phase flow bed, in which the voidage is constant, i need to ensure that the inlet mass flux of one phase is equal to the outlet flux from the top patch. Based on the groovyBC utility, i have defined Ua(volvectorField of one phase) in the inlet boundary, as shown below. UsL and UsR are both the inlet boundary.
23 type groovyBC;
24 valueExpression "0.5*flux";
25 variables "totalArea@UsL=sum(mag(Sf()));
26 value uniform ( 0 0 0 );
31 type groovyBC;
32 valueExpression "0.5*flux";
33 variables "totalArea@UsR=sum(mag(Sf()));
34 value uniform ( 0 0 0 );
However, when i ran the case, there were errors displayed on the screen.
--> FOAM FATAL IO ERROR:
problem while reading header for object Ua
file: /home/zhouquan/OpenFOAM/zhouquan-1.7.1/run/tutorials/multiphase/twoPhaseEulerFoam/bed3/0/Ua at line 1.
From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 69.
Who can tell me how to do with it?
As you pointed out, It's the error that i deleted the top of the file by accident. However, after correcting the mistake and running the case, there was another error.
file: /home/zhouquan/OpenFOAM/zhouquan-1.7.1/run/tutorials/multiphase/twoPhaseEulerFoam/bed3/0/Ua::boundaryField::UsL from line 25 to line 28.
From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /opt/openfoam171/src/finiteVolume/lnInclude/newFvPatchField.C at line 110.
What's wrong with the usage of groovyBC utility in my case? Besides, I have thought about the message and had a questions about it. As for defining the volvectorField with groovyBC utility in the boundary, it only gives the definition of "variables" and "valueExpression", but without direction of the vector(eg. Ua in my definition). How does it work?
25 type groovyBC;
26 variables "area1@UsL=sum(mag(Sf()));flux1@outlet=sum(phi a)/ area1/929.5;";
27 valueExpression "0.5*flux1";
28 value uniform ( 0 0 0 );
33 type groovyBC;
34 variables "area2@UsR=sum(mag(Sf()));flux2@outlet=sum(phi a)/ area2/929.5;";
35 valueExpression "0.5*flux2";
36 value uniform ( 0 0 0 );
and ran the case with "twoPhaseEulerFoam", there was error message listed below.
--> FOAM FATAL ERROR:
Parser Error at "1.11-15" :"field area1 not existing or of wrong type"
" ^^^^^ "
From function parsingValue
in file PatchValueExpressionDriver.C at line 192.
I have searched the relevant information, but nothing useful in the web. Why did it say that field area1 is not existing, which i have defined in the "variables" ?
Looking forward to answer, thank you!
a) you're using the old syntax for remote variables so you're using the old-school groovyBC (not the one that comes with swak4Foam). I havn't activly worked on that for over a year and will only fix this bug if it is easy to do
b) area1 and area2 do not have to be remote variables because they are defined on the same patch as the BC. Unlikely, but maybe this is the problem
I'll have a look when I find time. A bug report on the OF-extend-Mantis would speed this up
I am using twoPhaseEulerFoam to simulate gas-solid flow.
My question is - I can easily calculate min fluidization velocity (so no need mass flow rate initially ).
But when I need to consider recirculating flow I only can set mass flow rate. How I change B.C ???
- it has no relation to the topic of the thread (so the people in the thread will not be interested. And those people interested in twoPhaseEulerFoam will not find it)
- it is very brief and to answer it one must guess what you mean with certain formulations (rule of thumb: don't expect anyone to spend more time on an answer than you spent on formulating the question)
So the only answer I can give to your question ist: "Carefully"
Have a look at https://openfoamwiki.net/index.php/H..._Message_Board and then retry in a proper place
|All times are GMT -4. The time now is 03:18.|