CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

create constant transport properties for multi region case

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By JeremyChvlr

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 29, 2013, 02:10
Default create constant transport properties for multi region case
  #1
Member
 
Kumudu
Join Date: Oct 2013
Posts: 63
Rep Power: 13
Kumudu is on a distinguished road
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
Kumudu is offline   Reply With Quote

Old   December 17, 2021, 07:31
Default
  #2
New Member
 
Mostafa
Join Date: Oct 2021
Posts: 22
Rep Power: 5
mostafa kareem is on a distinguished road
hello , i have the same problem. did you find answer
mostafa kareem is offline   Reply With Quote

Old   June 26, 2022, 09:02
Default
  #3
New Member
 
Join Date: Jun 2022
Posts: 1
Rep Power: 0
PoorpoorMan is on a distinguished road
Same Question
PoorpoorMan is offline   Reply With Quote

Old   January 25, 2023, 07:05
Default
  #4
New Member
 
Jérémy Chevalier
Join Date: Feb 2021
Posts: 10
Rep Power: 5
JeremyChvlr is on a distinguished road
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
ancolli likes this.
JeremyChvlr is offline   Reply With Quote

Reply


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
ReactingFoam Laminar flame simulation transport properties gbansal OpenFOAM Running, Solving & CFD 3 November 23, 2012 17:03
[DesignModeler] Newbie - Create Region 5746085 ANSYS Meshing & Geometry 2 March 12, 2012 14:15
Transport properties with PPDF combustion Erik Siemens 0 February 18, 2009 06:18
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24
Whatbs best way to create new case jvn OpenFOAM Pre-Processing 2 June 20, 2005 22:19


All times are GMT -4. The time now is 02:27.