CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Liquid phase volume fraction

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 7, 2008, 13:50
Default It would probably be helpful i
  #21
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
It would probably be helpful if you did actually declare/read gamma from file.
/Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 8, 2008, 08:17
Default Ok, the tool is working now, b
  #22
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Ok, the tool is working now, but I have to recompile each time I want to use another pair of lower and upper limits.

So, now I'm trying to make the tool work with the input from the shell.

>> liquidPhaseVolumeFraction . . -lowerLimit 0 -upperLimit 0.015 -time 0

or somethin like that..

>> liquidPhaseVolumeFraction . . 0 0.015 -time 0

I don't know how these user inputs are treated, but I tried by putting these lines into my code, which I have altered from the patchAverage.

argList::validArgs.append("lowerLimit");
argList::validArgs.append("upperLimit");

scalar lowerLimit(args.args()[3]);
scalar upperLimit(args.args()[4]);

Of course there are some problems regarding the classes:

DPOpt/liquidPhaseVolumeFraction.o
liquidPhaseVolumeFraction.C: In function 'int main(int, char**)':
liquidPhaseVolumeFraction.C:64: error: cannot convert 'const Foam::string' to 'Foam::scalar' in initialization
liquidPhaseVolumeFraction.C:65: error: cannot convert 'const Foam::string' to 'Foam::scalar' in initialization

It looks like upper and lower limits are read as strings from the shell. Trying to make the variables work inside the code as scalar does not seem to work.

So, where is the clue to read them from the shell as scalar, double or something similar and to be able to address the variables in the further code.

Thanks so far.
Greetings from rainy Germany.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   August 8, 2008, 08:21
Default Sorry, I have another question
  #23
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 11
sega is on a distinguished road
Sorry, I have another question.

Niels, is your code calculating the phase fraction on the patch or on the whole 3D-domain (on the wedge in this case) ?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   August 21, 2008, 05:58
Default The snippet calculates the vol
  #24
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Deltares, Delft, The Netherlands
Posts: 1,609
Rep Power: 25
ngj will become famous soon enoughngj will become famous soon enough
The snippet calculates the volume fraction for the entire domain, as the forAll(gamma,gI) loops over all internal cells.
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi phase Volume fraction at inlet F S CFX 1 April 11, 2011 21:08
need references for Liquid-liquid two-phase flow qunwuhe@hotmail.com Main CFD Forum 1 December 8, 2009 04:32
How to set volume fraction in two phase flow Kamel FLUENT 2 March 23, 2007 01:06
How set volume fraction and species mass fraction Reginaldo Cotto FLUENT 0 August 31, 2006 04:58
Time-averaged phase volume fraction dlaw FLUENT 5 August 3, 2005 13:33


All times are GMT -4. The time now is 14:38.