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

Location of Transportproperties name

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 21, 2014, 05:33
Default Location of Transportproperties name
  #1
New Member
 
Josh Dyson
Join Date: Mar 2011
Posts: 12
Rep Power: 7
jd210 is on a distinguished road
Hello Foamers!

I'm creating quite a complex multiphase code and Iíve found Iím running into conflicts with my transportpropertiesdict, I understand it's probably not great practise but I'd like to change the name of the dictionary file that "phaseChangeTwoPhaseMixture" uses. Somewhere it is currently set to transportproperties but I've spent an awful long time searching for that bit of code and can't find it. Could someone point me in the right direction?

Thanks in advance
jd210 is offline   Reply With Quote

Old   February 24, 2014, 05:45
Default
  #2
Member
 
shinji nakagawa
Join Date: Mar 2009
Location: Japan
Posts: 31
Rep Power: 9
snak is on a distinguished road
Hi, josh,


twoPhaseProperites is created at line 33 of createFileds.H in the interPhaseChangeFoam solver.
Here, New() method of phaseChangeTwoPhaseMixture is used.
You can find the definition of this New() method in the following file:
applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newphaseChangeTwoPhaseMixture.C

In this file, "transportPropertie" is used as a dictionary name under the constant directory.

This procedure will be introduced with RunTimeSelection mechanism of OpenFOAM.
This is very useful for run-time, not for reading source-code, I feel.
http://openfoamwiki.net/index.php/Op...tion_mechanism

I'm not sure this comment answers your question.
I hope this comment help your or induce reply from source-code experts.
snak is offline   Reply With Quote

Old   February 24, 2014, 09:45
Default
  #3
New Member
 
Josh Dyson
Join Date: Mar 2011
Posts: 12
Rep Power: 7
jd210 is on a distinguished road
Hi Shinji,

Yes, I discovered this today, but haven't had a chance to reply. I have changed newPhaseChangeTwoPhaseMixture.C so that it now uses "phaseChangeProperties" as it's dictionary. However for some reason it is still also using transportProperties for something which is causing an error because that dictionary is set-up for something else.

My understanding is because it uses transportModel.C/H for some of it's classes and so tries to read transportProperties for the information it got from phaseChangeProperties generating the error I described.

I think I will have to implement a non-shared version of transportModel in order to get around this problem.

Perhaps it's something that needs to be looked at if the idea of newPhaseChangeTwoPhaseMixture.C is to allow you to choose your dictionary file at the moment I'm pretty confident it's not possible.

Thanks
jd210 is offline   Reply With Quote

Old   February 25, 2014, 06:53
Default
  #4
Member
 
shinji nakagawa
Join Date: Mar 2009
Location: Japan
Posts: 31
Rep Power: 9
snak is on a distinguished road
Hi Josh,

It is difficult for me to make any helpful comment because I don't know what exactly do you want with your custom solver and I don't know the error message you got.

It will be easy to create new dictionary and read info you want. It will be simple like createFileds of icoFoam.

If you want something like SchnerrSauer model, you can mimic it to utilize RunTimeSelection mechanism. You can put extra information on the transportProperties and use a part of it. TransportProperties file of "cavitatingBullet" tutorial contains coefficients for several cavitation models. The only one of them are selected on run-time.
snak is offline   Reply With Quote

Old   February 26, 2014, 04:34
Default
  #5
New Member
 
Josh Dyson
Join Date: Mar 2011
Posts: 12
Rep Power: 7
jd210 is on a distinguished road
Hi Shinji,

I've solved the problem. I created copies of some shared libraries with different names and then changed the class name of the transportproperties dictionary class. This is working as I'd hoped, just a little messy.

Thanks

Josh
jd210 is offline   Reply With Quote

Old   February 26, 2014, 13:47
Default
  #6
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 73
Rep Power: 5
ChrisA is on a distinguished road
Given that you've already solved your problem it seems like a moot point but I'm curious, why didn't you simply create a different dictionary for your custom solver to use? Assuming that the transportProperties that you needed to be read are being read in at the solver level you could have declared a new dictionary and avoided any conflict with the existing openfoam structure.
ChrisA is offline   Reply With Quote

Old   February 27, 2014, 04:30
Default
  #7
New Member
 
Josh Dyson
Join Date: Mar 2011
Posts: 12
Rep Power: 7
jd210 is on a distinguished road
Hi Chris,

I've only been coding OpenFOAM (and C++ for that matter) for 4 months now. So I might not be doing it the right way. But my new solver is only made up of parts of other solvers so all I'm doing is adding in these parts and connecting them all. So I guess my thought is that if I created a new dictionary I'd have to change a lot of code in all of these sections of the solver rather than just a bit in one of them. Also having a number of dictionary files can be quite useful as I think if they were merged all into one it would be over 1000 lines long.

Josh
jd210 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
Radiation interface hinca CFX 15 January 26, 2014 18:11
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30


All times are GMT -4. The time now is 15:12.