|
[Sponsors] |
create constant transport properties for multi region case |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13 ![]() |
Hi,
I have multi-regions in my problem. I want to define different transport properties which are constants for each region feild. This is the way I am doing, in the file createFluidFeilds.H PtrList<dimensionedScalar> rhoFluid(fluidRegions.size()); Info<< " Adding transport properties to fluid field\n" << endl; forAll(fluidRegions, i) { IOdictionary fluidtransportProperties ( IOobject ( "transportProperties", runTime.constant(), fluidRegions[i], IOobject::MUST_READ, IOobject::NO_WRITE ) ); Info<< "\tReading fluid density\n" << endl; rhoFluid.set ( i, new dimensionedScalar ( fluidRegions[i].fluidtransportProperties.lookup("rho") ) ); } I want to have different "tranportProperties" dictionary files for each region.Is this method is correct?. or, PtrList<dimensionedScalar> rhoFluid(fluidRegions.size()); Info<< " Adding transport properties to fluid field\n" << endl; forAll(fluidRegions, i) { fluidtransportProperties.set ( i, new IOdictionary fluidtransportProperties ( IOobject ( "transportProperties", runTime.constant(), fluidRegions[i], IOobject::MUST_READ, IOobject::NO_WRITE ) ) ); Info<< "\tReading fluid density\n" << endl; rhoFluid.set ( i, new dimensionedScalar ( fluidRegions[i].fluidtransportProperties.lookup("rho") ) ); } Please anyone help me ![]() Kumudu |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Mostafa
Join Date: Oct 2021
Posts: 22
Rep Power: 5 ![]() |
hello , i have the same problem. did you find answer
![]() |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Join Date: Jun 2022
Posts: 1
Rep Power: 0 ![]() |
Same Question
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Jérémy Chevalier
Join Date: Feb 2021
Posts: 10
Rep Power: 6 ![]() |
I all,
I had the same problem and I fixed it with a simple method. PtrList<dimensionedScalar> rhoList(solidRegions.size()); forAll(solidRegions, i) { IOdictionary properties ( IOobject ( "properties", runTime.constant(), solidRegions[i], IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); rhoList.set ( i, new dimensionedScalar ( properties.lookup("rho") ) ); } Like this, for every region it read a properties file in the constant/region folder. And then it fill the rhoList with the corresponding value in the corresponding properties file for the corresponding region. In my case it's solid but I guess it's exactly the same for you I hope it helped you Sorry for bad english Jérémy |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ReactingFoam Laminar flame simulation transport properties | gbansal | OpenFOAM Running, Solving & CFD | 3 | November 23, 2012 16:03 |
[DesignModeler] Newbie - Create Region | 5746085 | ANSYS Meshing & Geometry | 2 | March 12, 2012 13:15 |
Transport properties with PPDF combustion | Erik | Siemens | 0 | February 18, 2009 05:18 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 12:24 |
Whatbs best way to create new case | jvn | OpenFOAM Pre-Processing | 2 | June 20, 2005 21:19 |