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

chtMultiRegionFoam and Ychar and Ypmma fields

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2011, 14:20
Default chtMultiRegionFoam and Ychar and Ypmma fields
  #1
New Member
 
vladimir krejci
Join Date: Mar 2009
Location: Czech Republic
Posts: 20
Rep Power: 17
Lada is on a distinguished road
I am playing around with the chtMultiRegionFoam solver and struggling with undersdanding what Ychar and Ypmma fields are for. They seem to apply to solids only.

Could anyone clarify meaning of those for me, please?

Having grepped the entire foam directory I found them in the multiregion tutorials only.
Do I need those fields when modeling a multiple solid case?

Thanks,
Lada
Lada is offline   Reply With Quote

Old   October 24, 2011, 11:13
Default
  #2
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
I do not know if that is the same case for this tutorial case, but I know from combustion simulation that "char" is most of the time used for kind of inert fractions, while "pmma" could be used for poly-methyl-met-acrylat or some other strange substance that is not inert to chemical processes...
In general in combustion (and in chemistry-simulation as well, to my knowledge), "Y" is used as a letter defining a fraction within a mixture.

My guess would be these values are used to calculate any mixture-average-values containing pmma and char...
Linse is offline   Reply With Quote

Old   October 24, 2011, 14:05
Default
  #3
New Member
 
vladimir krejci
Join Date: Mar 2009
Location: Czech Republic
Posts: 20
Rep Power: 17
Lada is on a distinguished road
Although it sounds convincing, I am now puzzled even more .

The thing is there is no chemistry or species present in those tutorials. They are just simple buoyant air flow around a solid (iron or so) material cases.

Based on what you wrote, it might be something that the author of all multiRegion tutorials forgot to remove because it is present only in time directories that relate to the solids (the changeDictionaryDict files that are used to modify boundary conditions for the particular model region (solid material), contain the Ychar and Ypmma as well).
It does not seem to be calculated as it appears in '0' directory only.

It is rather confusing.

Thank you for your response.
Lada is offline   Reply With Quote

Old   February 23, 2013, 12:58
Default
  #4
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Hi Vladimir,

I would like to know if you were able to solve the multiregion Problem. I am trying to solve a heat conductive equation between 2 solids of different thermal conductivities k1 and k2. I am using the chtMultiRegionFoam to solve this problem. I would like to enforce the following heat flux boundary condition

k1 grad(T) (region 1) = k2 grad(T) (region 2).

Kindly let me know what predefined boundary condition in OpenFoam corresponds to this BC.

Thanks

Regards
Vishal
nandiganavishal is offline   Reply With Quote

Old   February 23, 2013, 13:18
Default
  #5
New Member
 
vladimir krejci
Join Date: Mar 2009
Location: Czech Republic
Posts: 20
Rep Power: 17
Lada is on a distinguished road
Hi Vishal,
if you are asking whether I have found out what those Ychar and Ypmma are for, I must tell you: no, I haven't. But for solids only calculation, they don't seem to have any meaning.
Regarding your problem. I am not clear what you want to do. Help me if I am wrong.
My understanding is that you want to solve conduction problem across two layers different in their conductivity. I would suggest that you just modify one of the tutorials accordingly.
I am not sure if what I imposed as a boundary condition between the two materials was correct but it worked (I used compressible::turbulentTemperatureCoupledBaffleMix ed for the boundary type, as it is what is in the chtMulti... tutorials).
This is exactly what is in the relevant part of changeDictionaryDict file:
boundaryField
{
".*"
{
type zeroGradient;
}
"interface_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K solidThermo;
KName none;
value uniform 275;
}
}


Hope this helps.
Lada

ps. please see the attached file. there is a 3 layer wall model in it which works just fine.
Attached Files
File Type: gz wall.tar.gz (4.7 KB, 64 views)

Last edited by Lada; February 23, 2013 at 14:43.
Lada is offline   Reply With Quote

Old   February 23, 2013, 13:28
Default
  #6
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
Sorry for not answering earlier!

@Lada: If I remember correctly, sometime ago I was looking into the business with Ychar, Ypmma and so forth again. And I found that somewhere a mixed conductivity had been calculated, based on these two parameters. I think it was somewhere in the thermophysicalproperties that one had to define the different materials concerning their conductivity, mass, and so forth...
Linse is offline   Reply With Quote

Old   February 23, 2013, 14:39
Default
  #7
New Member
 
vladimir krejci
Join Date: Mar 2009
Location: Czech Republic
Posts: 20
Rep Power: 17
Lada is on a distinguished road
Thanks Linse. I appreciate your help.
Now I know it is in solidThermophysicalProperties file of every solid region. But still have no clue what is it for. I copied coefficients for char 'variable' from chtMultiRegionFoam/multiRegionHeater/constant/heater tutorial here:

----------------------------------------------------------------------------------------------------------------------
charCoeffs
{
transport
{
K0 0.4;
n0 1.3;
Tref 300; //K0*pow(T/Tref_, n0))
}

radiation
{
sigmaS 0.0;
kappa 0.0;
emissivity 0.0;
}

thermodynamics
{
Hf 0;
C0 611.0;; // Cp = C0*(T/Tref)^n0
Tref 300;
n0 1.31;
}

density
{
rho 11.5;
}
}
----------------------------------------------------------------------------------------------------------------------
Unfortunately, I can't find much of a connection to what is defined at the beginning of the file within the constSolidThermoCoeffs section. This section was relevant to my simulations and when I modified it, it did the job I expected. I'll tinker with the char and pmma coeffs and see whether they have any effect on what I simulate.
Lada is offline   Reply With Quote

Old   February 23, 2013, 20:00
Default
  #8
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Hi Lada,

Thanks for the reply. I looked at your simulation set up files and have the following questions in the ChangeDictionaryDict file for concrete2.
"concrete_2_to_.*"
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K solidThermo;
KName none;
value uniform 261;
}

right
{
type mixed;
refValue uniform 258;
refGradient uniform 0;
valueFraction uniform 0.017871;

1. How did you know the temperature value ("261") at the boundary "concrete_2_to_.*"? What and where does this temperature value correspond ?

2. How did you calculate the valueFraction for the "right" patch boundary ?
3. What does the temperature value "258" here refer to?
4. Why did you use a mixed boundary condition ?

Please provide your reply.

Thanks

Regards
Vishal
nandiganavishal is offline   Reply With Quote

Old   February 24, 2013, 08:18
Default
  #9
New Member
 
vladimir krejci
Join Date: Mar 2009
Location: Czech Republic
Posts: 20
Rep Power: 17
Lada is on a distinguished road
Hi Vishal,

ad 1) the temperature appears in all changeDictionaryDict files and it is an initial guess of the temperature at the interface. You can put any number there or delete the whole line and not much will happen. Maybe a few extra iterations will be needed to converge the case.
ad 2) I calculated the valueFraction according to the following formula:
valueFraction= 1 / (1 + conductivity/delta/HTC)
conductivity (W/m/K) stands for the conductivity of the material layer (concrete_1 or concrete_2) which is defined in respective solidThermophysicalProperties file of the layers (regions)
delta (m) is the half thickness of the first cell layer adjacent to the boundary
HTC (W/m2/K) is the heat transfer coefficient at the wall
ad 3) 258 is the temperature of the fluid that is at the outer side of the boundary
ad 4) as I could not find better boundary type to define the Robin's boundary condition, I had to choose the mixed one. Imagine a wall that stands between you and outdoors. You don't want to solve the flow in the room or outdoors, but you know the temperatures indoors and outdoors as well as the heat transfer coefficients at both sides of the wall. The mixed boundary condition allows you to solve such a case. The only drawback of it is that when the solved domain mesh is refined, the valueFraction must be recalculated manually, unless you are skilled enough and rewrite the boundary condition code so it does it for you automatically.
elham usefi likes this.
Lada is offline   Reply With Quote

Old   February 25, 2013, 13:06
Default
  #10
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Quote:
Originally Posted by Lada View Post
Hi Vishal,

ad 1) the temperature appears in all changeDictionaryDict files and it is an initial guess of the temperature at the interface. You can put any number there or delete the whole line and not much will happen. Maybe a few extra iterations will be needed to converge the case.
ad 2) I calculated the valueFraction according to the following formula:
valueFraction= 1 / (1 + conductivity/delta/HTC)
conductivity (W/m/K) stands for the conductivity of the material layer (concrete_1 or concrete_2) which is defined in respective solidThermophysicalProperties file of the layers (regions)
delta (m) is the half thickness of the first cell layer adjacent to the boundary
HTC (W/m2/K) is the heat transfer coefficient at the wall
ad 3) 258 is the temperature of the fluid that is at the outer side of the boundary
ad 4) as I could not find better boundary type to define the Robin's boundary condition, I had to choose the mixed one. Imagine a wall that stands between you and outdoors. You don't want to solve the flow in the room or outdoors, but you know the temperatures indoors and outdoors as well as the heat transfer coefficients at both sides of the wall. The mixed boundary condition allows you to solve such a case. The only drawback of it is that when the solved domain mesh is refined, the valueFraction must be recalculated manually, unless you are skilled enough and rewrite the boundary condition code so it does it for you automatically.
Thanks Lada,

That clarifies my question !! I would like to know if it is possible to use this BC if there is a source of heat flux (q) at the interface of region 1 and region 2. Now the temperature at the wall (Tw) would be something like this

Tw=(k1/DeltaY1)/(k1/DeltaY1+k2/DeltaY2)*T1+(k2/DeltaY2)/(k1/DeltaY1+k2/DeltaY2)*T2 - q/(k1/DeltaY1+k2/DeltaY2)

where k1 - conductivity of region 1
k2 - conductivity of region 2
DeltaY1 - spatial discretization in region 1
DeltaY2 - spatial discretization in region 2
T1 - temperature near the surface of region 1
T2 - temperature near the surface of region 2

Please let me know.

Thanks
Regards
Vishal
nandiganavishal is offline   Reply With Quote

Old   February 25, 2013, 14:20
Default
  #11
New Member
 
vladimir krejci
Join Date: Mar 2009
Location: Czech Republic
Posts: 20
Rep Power: 17
Lada is on a distinguished road
Hi Vishal,

I guess you need thermal baffle boundary condition for that. I am not familiar with that though so not much of a use. See http://www.openfoam.org/version2.0.0/thermophysical.php
and the respective tutorial.
Lada is offline   Reply With Quote

Old   February 25, 2013, 17:15
Default
  #12
Senior Member
 
Vishal Nandigana
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208
Rep Power: 18
nandiganavishal is on a distinguished road
Quote:
Originally Posted by Lada View Post
Hi Vishal,

I guess you need thermal baffle boundary condition for that. I am not familiar with that though so not much of a use. See http://www.openfoam.org/version2.0.0/thermophysical.php
and the respective tutorial.
Thanks Lada for the tip !!
nandiganavishal is offline   Reply With Quote

Old   February 26, 2013, 02:53
Default Ypmma, Ychar
  #13
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
Quote:
Originally Posted by Lada View Post
Although it sounds convincing, I am now puzzled even more .

The thing is there is no chemistry or species present in those tutorials. They are just simple buoyant air flow around a solid (iron or so) material cases.

Based on what you wrote, it might be something that the author of all multiRegion tutorials forgot to remove because it is present only in time directories that relate to the solids (the changeDictionaryDict files that are used to modify boundary conditions for the particular model region (solid material), contain the Ychar and Ypmma as well).
It does not seem to be calculated as it appears in '0' directory only.

It is rather confusing.

Thank you for your response.
Hi vladimir,

i think that these are contribution ration of two species making the solid. the factor is modified from 0 in 0 folder to 0.5 for each in changeDictionaryDict file as every other variable. but i tried to change these factors to be 0.7and 0.5 so the summation of it will be greater than 1 which is wrong but the solver ran. another thing these Ychar, and Ypmma have characteristic (rho, cp, ...)that could be changed which recommend that it species of the solid. to solve this situation i suggest to set there properties as your material (make them have same properties) so you can make them as one material.

that what i think, i hope it will be useful.
Ahmed Khattab is offline   Reply With Quote

Old   February 26, 2013, 08:27
Default BC discription
  #14
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
Quote:
Originally Posted by nandiganavishal View Post
Hi Vladimir,

I would like to know if you were able to solve the multiregion Problem. I am trying to solve a heat conductive equation between 2 solids of different thermal conductivities k1 and k2. I am using the chtMultiRegionFoam to solve this problem. I would like to enforce the following heat flux boundary condition

k1 grad(T) (region 1) = k2 grad(T) (region 2).

Kindly let me know what predefined boundary condition in OpenFoam corresponds to this BC.

Thanks
Regards
Vishal
Hi Vishal,

please find below the description of BC compressible::turbulentTemperatureCoupledBaffleMix ed copied from .h file of this BC, i hope it will be helpful for you.

Code:
Description
    Mixed boundary condition for temperature, to be used for heat-transfer
    on back-to-back baffles.

    Specifies gradient and temperature such that the equations are the same
    on both sides:
    - refGradient = zero gradient
    - refValue = neighbour value
    - mixFraction = nbrKDelta / (nbrKDelta + myKDelta())

    where KDelta is heat-transfer coefficient K * deltaCoeffs

    Example usage:
        myInterfacePatchName
        {
            type        compressible::turbulentTemperatureCoupledBaffleMixed;
            neighbourFieldName  T;
            K                   lookup;
            KName               K;
            value               uniform 300;
        }

    Needs to be on underlying mapped(Wall)FvPatch.

    Note: K : heat conduction at patch. Gets supplied how to lookup/calculate K:
    - 'lookup' : lookup volScalarField (or volSymmTensorField) with name
    - 'basicThermo' : use basicThermo and compressible::RASmodel to calculate K
    - 'solidThermo' : use basicSolidThermo K()
    - 'directionalSolidThermo' directionalK()

    Note: runs in parallel with arbitrary decomposition. Uses mapped
    functionality to calculate exchange
Good Luck
Ahmed Khattab is offline   Reply With Quote

Old   September 25, 2013, 02:14
Default Helping
  #15
New Member
 
sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 13
Sasy is on a distinguished road
Hi Foarmers
I want simulate evaporation in two phase.(gaz and liquid) with conjugate heat transfer.But i dont know i use two phase solver (such as interFoam or interPhasechangeFoam) and add solid Region or use chtMultiRegionFoam and modify for twophase??
Sasy is offline   Reply With Quote

Old   September 25, 2013, 04:31
Default
  #16
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
Now, you have to combine the 2 . You need to change the fluid dictionary of the chtMultiRegionFoam solver with interFoam. I did something simular already. So if you have problem I might be able to help.

Let me have one question, however. I do not know phase change modelling, but I plan to do a simulation of water jet impingement on heated planar surface. Now, I planned to do it with compressible multiphase solver., since I suspact that water wapour is compressible. What do you think about this? Can you model evaporation with incompressible flow solver?
mizzou likes this.
klilla is offline   Reply With Quote

Old   September 25, 2013, 04:40
Default
  #17
New Member
 
sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 13
Sasy is on a distinguished road
Quote:
Originally Posted by klilla View Post
Now, you have to combine the 2 . You need to change the fluid dictionary of the chtMultiRegionFoam solver with interFoam. I did something simular already. So if you have problem I might be able to help.

Let me have one question, however. I do not know phase change modelling, but I plan to do a simulation of water jet impingement on heated planar surface. Now, I planned to do it with compressible multiphase solver., since I suspact that water wapour is compressible. What do you think about this? Can you model evaporation with incompressible flow solver?
Hi kapa
thank you For reply
yes,i use interPhasechange solver (that is for incompresible fluid) and modify this solver by adding Energy equation and source term.but i should implemented conjugate heat transfer for my case.and i dont have idae.in youre opinion can I implemented solid region for my solver or not,i should use chtMultiRegionFoam solver and modify this solver for two phase incompresible with phase change?
Sasy is offline   Reply With Quote

Old   September 25, 2013, 04:51
Default
  #18
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
If you go to the chtMultiRegionSimpleFoam solver source code, you can see a directory called (fluid). That is the directory, where you have to work in. At the release implementation it is derived from simpleFoam. First I suggest to compare simpleFoam and chtMultiRegionSimpleFoam/fluid files in order to understand the way of implementation. Than you can start to change it for your need.

Good luck,
Lilla
klilla is offline   Reply With Quote

Old   September 25, 2013, 04:59
Default
  #19
New Member
 
sasan
Join Date: Sep 2013
Posts: 28
Rep Power: 13
Sasy is on a distinguished road
Quote:
Originally Posted by klilla View Post
If you go to the chtMultiRegionSimpleFoam solver source code, you can see a directory called (fluid). That is the directory, where you have to work in. At the release implementation it is derived from simpleFoam. First I suggest to compare simpleFoam and chtMultiRegionSimpleFoam/fluid files in order to understand the way of implementation. Than you can start to change it for your need.

Good luck,
Lilla
thank you for reply
But i have a question..
why chtMultiRegionSimpleFoam? what is differnce with chtMultiRegionFoam? az i said,my fluid is incompresible,but i think this solver for compressible Fluid,am I right?
Regards,
Sasy is offline   Reply With Quote

Old   September 25, 2013, 05:11
Default
  #20
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
Indeed, I have forgotten that. You need to compare it with rhoSimpleFoam than. It is a nice excersice.
Lilla
klilla is offline   Reply With Quote

Reply

Tags
boundary conditions, chtmultiregionfoam, ychar, ypmma


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



All times are GMT -4. The time now is 04:42.