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

chtmultiregionFoam Boundary condition

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2013, 23:35
Default chtmultiregionFoam Boundary condition
  #1
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
Dear Foamers,

I want to solve 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, 12:02
Default
  #2
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
Hello all,

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:14
Default
  #3
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Quote:
Originally Posted by nandiganavishal View Post
Hello all,

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 visal

imagine that your gradient is in one Y direction and your region 1 is above the region 2.

you will have:

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

if you calculate the Tw you will have:

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

you can implement this by using mixed boundary condition as in openfoam by calculating the refval and valuefraction.

Best
Mahdi
mm.abdollahzadeh is offline   Reply With Quote

Old   February 23, 2013, 17:28
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
Thanks Mahdi.

What should be the values for refVal and valuefraction, as both T1 and T2 are unknown !! Please let me know !!

Regards

Vishal
nandiganavishal is offline   Reply With Quote

Old   February 25, 2013, 04:06
Default
  #5
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Hi vishal

T1 and T2 are the value of your internal field near surface in zone 1 and zone 2. it is similar to the case of zero gradient Tw=Tin.

mixed bounday is like this:

Tw=valuefrac*Tref+(1-valuefrac)*(Tin+refgrad*DeltaYin)
and we have
Tw=(k1/DeltaY1)/(k1/DeltaY1+k2/DeltaY2)*T1+(k2/DeltaY2)/(k1/DeltaY1+k2/DeltaY2)*T2

so if u are solving in zone 1:

Tref=T2 and valuefrac=(k2/DeltaY2)/(k1/DeltaY1+k2/DeltaY2) and refgrad=0

for zone 2

Tref=T1 and valuefrac=(k1/DeltaY1)/(k1/DeltaY1+k2/DeltaY2) and refgrad=0

Best
Mahdi

Quote:
Originally Posted by nandiganavishal View Post
Thanks Mahdi.

What should be the values for refVal and valuefraction, as both T1 and T2 are unknown !! Please let me know !!

Regards

Vishal
mm.abdollahzadeh is offline   Reply With Quote

Old   February 25, 2013, 11:02
Default
  #6
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 mm.abdollahzadeh View Post
Hi vishal

T1 and T2 are the value of your internal field near surface in zone 1 and zone 2. it is similar to the case of zero gradient Tw=Tin.

mixed bounday is like this:

Tw=valuefrac*Tref+(1-valuefrac)*(Tin+refgrad*DeltaYin)
and we have
Tw=(k1/DeltaY1)/(k1/DeltaY1+k2/DeltaY2)*T1+(k2/DeltaY2)/(k1/DeltaY1+k2/DeltaY2)*T2

so if u are solving in zone 1:

Tref=T2 and valuefrac=(k2/DeltaY2)/(k1/DeltaY1+k2/DeltaY2) and refgrad=0

for zone 2

Tref=T1 and valuefrac=(k1/DeltaY1)/(k1/DeltaY1+k2/DeltaY2) and refgrad=0

Best
Mahdi

Thanks Mahdi for the detailed reply. I understood the concept of mixed BC now. However, I am still not sure what is the value that should be specified for T1 or T2. This is because T1 which corresponds to the value near the surface of zone 1 is unknown during the course of the simulation right !! Hence, how do we define a numerical value for T1 without knowing the solution. Please brief me in this regard.

Thanks

Regards
Vishal
nandiganavishal is offline   Reply With Quote

Old   February 25, 2013, 11:06
Default
  #7
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Hi Vishal

you have iterative solution.
So for sure T1 and T2 at the begin have their initial values in your 0 folder. then they will be updated.

Best
Mahdi

Quote:
Originally Posted by nandiganavishal View Post
Thanks Mahdi for the detailed reply. I understood the concept of mixed BC now. However, I am still not sure what is the value that should be specified for T1 or T2. This is because T1 which corresponds to the value near the surface of zone 1 is unknown during the course of the simulation right !! Hence, how do we define a numerical value for T1 without knowing the solution. Please brief me in this regard.

Thanks

Regards
Vishal
mm.abdollahzadeh is offline   Reply With Quote

Old   February 25, 2013, 11:59
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
Quote:
Originally Posted by mm.abdollahzadeh View Post
Hi Vishal

you have iterative solution.
So for sure T1 and T2 at the begin have their initial values in your 0 folder. then they will be updated.

Best
Mahdi
Thanks Mahdi. That clarifies !! I was assuming once T1 and T2 are specified, they are always assumed to be the same and did not realize that they would be updated during the course of the simulation.

I would like to know, if it is possible to modify this BC when there is a source of heat flux at the boundary. For instance if the heat flux is q, then Tw now be something like this


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

How can specify such a BC.
nandiganavishal is offline   Reply With Quote

Old   February 25, 2013, 13:00
Default
  #9
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
yes its possible.

then your refgrad is not any more zero and its equal to q/(k1/DeltaY1)/DeltaY1 in region 1 and q/(k2/DeltaY2)/DeltaY2.



Quote:
Originally Posted by nandiganavishal View Post
Thanks Mahdi. That clarifies !! I was assuming once T1 and T2 are specified, they are always assumed to be the same and did not realize that they would be updated during the course of the simulation.

I would like to know, if it is possible to modify this BC when there is a source of heat flux at the boundary. For instance if the heat flux is q, then Tw now be something like this


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

How can specify such a BC.
mm.abdollahzadeh is offline   Reply With Quote

Old   February 25, 2013, 13:46
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 mm.abdollahzadeh View Post
yes its possible.

then your refgrad is not any more zero and its equal to q/(k1/DeltaY1)/DeltaY1 in region 1 and q/(k2/DeltaY2)/DeltaY2.
Thanks Mahdi

A quick question on the notation of "q/(k1/DeltaY1)/DeltaY1", you meant "q*DeltaY1/(k1/DeltaY1)" or "q/(k1/(DeltaY1*DeltaY1))

Regards
Vishal
nandiganavishal is offline   Reply With Quote

Old   February 25, 2013, 13:50
Default
  #11
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
this is the correct:
q/(k1/(DeltaY1*DeltaY1))

the division by extra DeltaY1 is because in mixed boundary the refgrad is already multiplied by DeltaY1

Quote:
Originally Posted by nandiganavishal View Post
Thanks Mahdi

A quick question on the notation of "q/(k1/DeltaY1)/DeltaY1", you meant "q*DeltaY1/(k1/DeltaY1)" or "q/(k1/(DeltaY1*DeltaY1))

Regards
Vishal
mm.abdollahzadeh is offline   Reply With Quote

Old   February 25, 2013, 17:24
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 mm.abdollahzadeh View Post
this is the correct:
q/(k1/(DeltaY1*DeltaY1))

the division by extra DeltaY1 is because in mixed boundary the refgrad is already multiplied by DeltaY1
Hi Mahdi,

I was rechecking the math for the flux BC and it looks like refgrad for region 1 is going to be "q/k1" rather than "q/(k1/(DeltaY1*DeltaY1))". The former looks consistent with respect to units as well. q(W/m^2)/k1(W/mK) would be K/m which when multiplied with DeltaY1 (as refgrad is multiplied with DeltaY1), would result in the units of Temperature (Kelvin). What do you think.

Regards
Vishal
nandiganavishal is offline   Reply With Quote

Old   February 26, 2013, 04:43
Default
  #13
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
q/k1 is correct . the privious formula that I was trying to say was q/(k1/DeltaY1)*(1/DeltaY1) which also is equal to q/k1

Quote:
Originally Posted by nandiganavishal View Post
Hi Mahdi,

I was rechecking the math for the flux BC and it looks like refgrad for region 1 is going to be "q/k1" rather than "q/(k1/(DeltaY1*DeltaY1))". The former looks consistent with respect to units as well. q(W/m^2)/k1(W/mK) would be K/m which when multiplied with DeltaY1 (as refgrad is multiplied with DeltaY1), would result in the units of Temperature (Kelvin). What do you think.

Regards
Vishal
mm.abdollahzadeh is offline   Reply With Quote

Old   March 9, 2013, 15:08
Default
  #14
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 Mahdi,

1. Have you had experience in coding multidomain problems using multiregionSimpleFoam.

2. I would like to know, how do we define the usual transport properties, say for a simple LaplacianFoam. We usually create a file named createFields and define the following.

Info<< "Reading transportProperties\n" << endl;

IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);


Info<< "Reading diffusivity DT\n" << endl;

dimensionedScalar DT
(
transportProperties.lookup("DT")
);

Now, in the case of a multidomain framework, how do we define the diffusivity DT. I looked at the tutorial but it is really complicated to understand. Please let me know your suggestions.

Thanks

Regards
Vishal
nandiganavishal is offline   Reply With Quote

Old   March 9, 2013, 16:43
Default
  #15
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Quote:
Originally Posted by nandiganavishal View Post
Hi Mahdi,

1. Have you had experience in coding multidomain problems using multiregionSimpleFoam.

2. I would like to know, how do we define the usual transport properties, say for a simple LaplacianFoam. We usually create a file named createFields and define the following.

Info<< "Reading transportProperties\n" << endl;

IOdictionary transportProperties
(
IOobject
(
"transportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);


Info<< "Reading diffusivity DT\n" << endl;

dimensionedScalar DT
(
transportProperties.lookup("DT")
);

Now, in the case of a multidomain framework, how do we define the diffusivity DT. I looked at the tutorial but it is really complicated to understand. Please let me know your suggestions.

Thanks

Regards
Vishal

Hi Vishal

imagine you have two zones. so you should have two mesh. lets say fmesh and smesh.
so you just need to creat the ftransportProperties for fmesh or stransportProperties for smesh.

Best
Mahdi
mm.abdollahzadeh is offline   Reply With Quote

Old   March 9, 2013, 17:45
Default
  #16
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 Mahdi,

Let me know if this makes sense. To define D1 for fluid mesh in the createFluidFields.H file, I do the following.

Info<< "Reading fluidtransportProperties\n" << endl;

IOdictionary fluidtransportProperties
(
IOobject
(
"fluidtransportProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);


/* Info<< "Reading diffusivity D1\n" << endl;*/

D1Fluid.set
(
fluidtransportProperties.lookup("D1")
);

Thanks
Vishal
nandiganavishal is offline   Reply With Quote

Old   March 20, 2013, 12:01
Default
  #17
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 Mahdi,

I was trying to implement the following boundary condition on a wall.

du/dy = B*dA/dx where A is obtained by solving another pde.

I can understand how to implement the boundary condition for the following case.

du/dy = B*dA/dy

However, I donot understand the former case. Let me know your suggestions.

Thanks

Vishal
nandiganavishal is offline   Reply With Quote

Old   November 26, 2013, 17:34
Default
  #18
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Quote:
Originally Posted by mm.abdollahzadeh View Post
Hi vishal

T1 and T2 are the value of your internal field near surface in zone 1 and zone 2. it is similar to the case of zero gradient Tw=Tin.

mixed bounday is like this:

Tw=valuefrac*Tref+(1-valuefrac)*(Tin+refgrad*DeltaYin)
and we have
Tw=(k1/DeltaY1)/(k1/DeltaY1+k2/DeltaY2)*T1+(k2/DeltaY2)/(k1/DeltaY1+k2/DeltaY2)*T2

so if u are solving in zone 1:

Tref=T2 and valuefrac=(k2/DeltaY2)/(k1/DeltaY1+k2/DeltaY2) and refgrad=0

for zone 2

Tref=T1 and valuefrac=(k1/DeltaY1)/(k1/DeltaY1+k2/DeltaY2) and refgrad=0

Best
Mahdi
Hi Mahdi,

I'm trying to solve a problem involving heat transfer between two diferent solid regions using laplacianFoam as Vishal told before. I'm quite new in this and, although I understand your theoretical explanation of the implementation of the boundary condition between both solids I can't figure out how to do it. My hesitation is how can I do to let OF know that it has to use T2 when computing T1? I mean, T2 belongs to another region, how can I call to this value from region 1?

Thanks in advance!
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

Old   November 27, 2013, 06:39
Default
  #19
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Quote:
Originally Posted by zfaraday View Post
Hi Mahdi,

I'm trying to solve a problem involving heat transfer between two diferent solid regions using laplacianFoam as Vishal told before. I'm quite new in this and, although I understand your theoretical explanation of the implementation of the boundary condition between both solids I can't figure out how to do it. My hesitation is how can I do to let OF know that it has to use T2 when computing T1? I mean, T2 belongs to another region, how can I call to this value from region 1?

Thanks in advance!
the boundary exist already in openfoam.

turbulentTemperatureCoupledBaffle

enjoy
mm.abdollahzadeh is offline   Reply With Quote

Old   November 27, 2013, 13:30
Default
  #20
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi Mahdi!

I've been searching for info about the usage of this BC but i can't see it clear. Could you please put a quick example of how it is used?

Thanks!
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday 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
Periodic Boundary Condition C.C Main CFD Forum 24 November 6, 2016 08:02
Domain Imbalance HMR CFX 5 October 10, 2016 05:57
Radiation interface hinca CFX 15 January 26, 2014 17:11
Setting outlet Pressure boundary condition using CAFFA code Mukund Pondkule Main CFD Forum 0 March 16, 2011 03:23
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 11:44


All times are GMT -4. The time now is 07:22.