|
[Sponsors] |
February 21, 2014, 05:33 |
Location of Transportproperties name
|
#1 |
New Member
Josh Dyson
Join Date: Mar 2011
Posts: 21
Rep Power: 15 |
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 |
|
February 24, 2014, 05:45 |
|
#2 |
Senior Member
|
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. |
|
February 24, 2014, 09:45 |
|
#3 |
New Member
Josh Dyson
Join Date: Mar 2011
Posts: 21
Rep Power: 15 |
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 |
|
February 25, 2014, 06:53 |
|
#4 |
Senior Member
|
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. |
|
February 26, 2014, 04:34 |
|
#5 |
New Member
Josh Dyson
Join Date: Mar 2011
Posts: 21
Rep Power: 15 |
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 |
|
February 26, 2014, 13:47 |
|
#6 |
Member
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 14 |
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.
|
|
February 27, 2014, 04:30 |
|
#7 |
New Member
Josh Dyson
Join Date: Mar 2011
Posts: 21
Rep Power: 15 |
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 |
|
|
|
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 07:28 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |