|
[Sponsors] |
[swak4Foam] GroovyBC problem in the defining inlet velocity |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 2, 2011, 00:32 |
GroovyBC problem in the defining inlet velocity
|
#1 |
New Member
Quan Zhou
Join Date: Jul 2010
Posts: 5
Rep Power: 16 |
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. boundaryField 20 { 21 UsL 22 { 23 type groovyBC; 24 valueExpression "0.5*flux"; 25 variables "totalArea@UsL=sum(mag(Sf())); flux@top=sum(phia())/totalArea/ 929.5;"; 26 value uniform ( 0 0 0 ); 27 } 28 29 UsR 30 { 31 type groovyBC; 32 valueExpression "0.5*flux"; 33 variables "totalArea@UsR=sum(mag(Sf())); flux@top=sum(phia())/totalArea/ 929.5;"; 34 value uniform ( 0 0 0 ); 35 } 35 } ........ 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? Thank you! |
|
August 2, 2011, 06:08 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
August 2, 2011, 09:27 |
|
#3 | |
New Member
Quan Zhou
Join Date: Jul 2010
Posts: 5
Rep Power: 16 |
Quote:
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. FOAM exiting " 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? |
||
August 2, 2011, 13:55 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
August 4, 2011, 00:28 |
|
#5 | |
New Member
Quan Zhou
Join Date: Jul 2010
Posts: 5
Rep Power: 16 |
Quote:
" boundaryField 22 { 23 UsL 24 { 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 ); 29 } 30 31 UsR 32 { 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 ); 37 } " 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" "sum(phia)/area1/929.5" " ^^^^^ " 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! |
||
August 4, 2011, 08:17 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
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 Bernhard |
||
October 18, 2014, 09:33 |
|
#7 |
New Member
sd
Join Date: May 2014
Posts: 14
Rep Power: 12 |
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 ??? |
|
October 18, 2014, 10:25 |
|
#8 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
- 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
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
Tags |
boundary condition u, groovybc, openfoam 1.7.1, twophaseeulerfoam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I prescribe Average Velocity /Total Inlet Flow for a simple channel problem? | skuznet | OpenFOAM Pre-Processing | 4 | February 16, 2022 10:44 |
3-D parabolic velocity Inlet - Steady state - UDF Turbulent Flow | mohibanwar | Fluent UDF and Scheme Programming | 10 | May 18, 2015 11:34 |
[swak4Foam] Power law inlet velocity using groovyBC | aviator | OpenFOAM Community Contributions | 3 | November 13, 2013 11:50 |
Velocity inlet BC problem | Figd84 | FLUENT | 5 | October 16, 2009 02:46 |
UDF paraboloid velocity inlet | Ronak Shah | FLUENT | 0 | June 4, 2003 10:44 |