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

chtMultiRegionFoam, adding a member to an existing class (regionProperties)

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2012, 13:13
Default chtMultiRegionFoam, adding a member to an existing class (regionProperties)
  #1
New Member
 
Romain
Join Date: Aug 2012
Posts: 12
Rep Power: 13
romain.h is on a distinguished road
Hello,
I would like to add a member to an existing class, regionproperties, which already have two members, solid and liquid, but I do not find how to do so.
I would like to have solid, liquid and gas.
Gas will not be resolve with the same equations as liquid.

I try to modify the existing regionProperties.C. in src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/regionProperties.C (and .H)
But I can not run the .Allwmake in the opt directory, and if I copy the src directory in my user directory, and I have the following error :
Code:
+ wmake libso turbulenceModel
/usr/bin/ld: cannot open output file /opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleTurbulenceModel.so: Permission denied
collect2: ld returned 1 exit status
make: *** [/opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleTurbulenceModel.so] Error 1
+ wmake libso RAS
/usr/bin/ld: cannot open output file /opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleRASModels.so: Permission denied
collect2: ld returned 1 exit status
make: *** [/opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleRASModels.so] Error 1
+ wmake libso LES
/usr/bin/ld: cannot open output file /opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleLESModels.so: Permission denied
collect2: ld returned 1 exit status
make: *** [/opt/openfoam211/platforms/linux64GccDPOpt/lib/libcompressibleLESModels.so] Error 1
If someone could try to explain how I could modify an existing class which is located in the src directory or point me in the right direction it will be greatly appreciated.

An other solution will be to specify that all liquid region do not have to be solve by the same equation, by I am also stuck here.
I will have to put something else than forAll(fluidRegions) in the following code :

Code:
    forAll(fluidRegions, i)
        {
            Info<< "\nSolving for fluid region "
                << fluidRegions[i].name() << endl;
            #include "setRegionFluidFields.H"
            #include "readFluidMultiRegionSIMPLEControls.H"
            #include "solveFluid.H"
        }
Thanks,
Romain
romain.h is offline   Reply With Quote

Old   October 10, 2012, 16:05
Default
  #2
New Member
 
Romain
Join Date: Aug 2012
Posts: 12
Rep Power: 13
romain.h is on a distinguished road
The easiest solution I have found, even if it is not as elegant as I would like is to use a "if test" in myChtSimpleFoam.C and to check the name of the liquid region.
If it is gas, I use solveGas.H, if it is some other name, I use solveFluid.H

It is working if I use the right name for my zone. I could have problem with multiples zones, but I guess I could found a way with something like regionname1_gas (ect)
romain.h is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 12:39
Doxygen documentation Tanay OpenFOAM Installation 9 September 23, 2011 12:40
Help with chtMultiRegionFoam jbvw96 OpenFOAM Running, Solving & CFD 2 December 26, 2010 18:16
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
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 11:21.