CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

multiphaseInterFoam access to alpha.water

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

Like Tree4Likes
  • 1 Post By bbita
  • 3 Post By jpeter3

Reply
 
LinkBack Thread Tools Display Modes
Old   June 5, 2014, 04:45
Default multiphaseInterFoam access to alpha.water
  #1
New Member
 
Martin K
Join Date: Jan 2013
Location: Germany
Posts: 28
Rep Power: 7
Martin_K_lalelu is on a distinguished road
Hi all,

to modify the multiphaseInterFoam solver I'm trying to use alpha.water in the UEqn.
How can I adress it?

My approach:
Code:
 volScalarField& alphaWater = objectRegistry::lookupObject<volScalarField>("alpha.water");
Any advices, explanations or links to understand how to read values out of fields will be appreciated!

Edit:
Compilation error:
Quote:
cannot call member function ‘const Type& Foam:bjectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>]’ without object
Martin_K_lalelu is offline   Reply With Quote

Old   October 19, 2017, 21:26
Default
  #2
New Member
 
Join Date: May 2017
Posts: 23
Rep Power: 2
bbita is on a distinguished road
Hi Martin,

Could you find answer to your question? I am trying to address alpha of my first phase.

Thanks
bbita is online now   Reply With Quote

Old   November 3, 2017, 07:45
Default
  #3
New Member
 
Gary
Join Date: Oct 2017
Posts: 4
Rep Power: 2
MrFyzzix is on a distinguished road
I am struggling with the same problem. Any help would be welcome!
MrFyzzix is offline   Reply With Quote

Old   November 3, 2017, 11:00
Default
  #4
New Member
 
Join Date: May 2017
Posts: 23
Rep Power: 2
bbita is on a distinguished road
Hi Gary,

You have to include your changes e.g. new parameter in multiphaseMixture.
MrFyzzix likes this.
bbita is online now   Reply With Quote

Old   November 8, 2017, 11:30
Default
  #5
New Member
 
Gary
Join Date: Oct 2017
Posts: 4
Rep Power: 2
MrFyzzix is on a distinguished road
Thanks for your comment, bbita. I tried it, but I did not get it to work. I am not an experienced programmer. Could you show me how you solved it?
MrFyzzix is offline   Reply With Quote

Old   November 8, 2017, 11:37
Default
  #6
New Member
 
Join Date: May 2017
Posts: 23
Rep Power: 2
bbita is on a distinguished road
Hi gary,

It completely depends on the changes you want to apply in your code. I suggest you to understand different sections in the file. For instance, if you want to add a new parameter, you can do that similar to the way that rho is defined.
bbita is online now   Reply With Quote

Old   November 9, 2017, 17:30
Default
  #7
New Member
 
JPeternel
Join Date: Oct 2014
Posts: 9
Rep Power: 5
jpeter3 is on a distinguished road
Hay!

If i remember correctly, in interMultiphaseFoam, all the phase fields are stored in phases_ of multiphaseMixture.

So accessing one of them would probably look like:

volScalarField& alphaWater= mixture.phases()["water"];

mixture - name of multiphaseMixture class
phases() - returns PtrDictionary<phase> phases_
["sth"] - looks if there is a phase that has a name "sth" in phases_, and returns it


hope it helps
Elham, bbita and MrFyzzix like this.
jpeter3 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
[DesignModeler] DesignModeler Scripting: How to get Full Command Access ANT ANSYS Meshing & Geometry 48 November 17, 2016 05:12
Online libraries - with access to Journals momentum_waves Main CFD Forum 2 December 12, 2007 11:08
UDF Data Access Macro Woo Meng Wai FLUENT 0 November 6, 2007 21:23
Access Density Allan Walsh FLUENT 3 October 4, 2005 07:55
access to variables at interface of porous media? Mazyar FLUENT 0 October 10, 2003 14:59


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