CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   chtmultiregionFoam Boundary condition (http://www.cfd-online.com/Forums/openfoam-solving/113386-chtmultiregionfoam-boundary-condition.html)

nandiganavishal February 19, 2013 00:35

chtmultiregionFoam Boundary condition
 
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 February 23, 2013 13:02

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

mm.abdollahzadeh February 23, 2013 14:14

Quote:

Originally Posted by nandiganavishal (Post 409696)
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

nandiganavishal February 23, 2013 18:28

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 February 25, 2013 05:06

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 (Post 409737)
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 February 25, 2013 12:02

Quote:

Originally Posted by mm.abdollahzadeh (Post 409881)
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

mm.abdollahzadeh February 25, 2013 12:06

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 (Post 409977)
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 February 25, 2013 12:59

Quote:

Originally Posted by mm.abdollahzadeh (Post 409979)
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.

mm.abdollahzadeh February 25, 2013 14:00

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 (Post 409992)
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 February 25, 2013 14:46

Quote:

Originally Posted by mm.abdollahzadeh (Post 410007)
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

mm.abdollahzadeh February 25, 2013 14:50

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 (Post 410012)
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 February 25, 2013 18:24

Quote:

Originally Posted by mm.abdollahzadeh (Post 410013)
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

mm.abdollahzadeh February 26, 2013 05:43

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 (Post 410041)
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 March 9, 2013 16:08

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

mm.abdollahzadeh March 9, 2013 17:43

Quote:

Originally Posted by nandiganavishal (Post 412793)
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

nandiganavishal March 9, 2013 18:45

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 March 20, 2013 13:01

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

zfaraday November 26, 2013 18:34

Quote:

Originally Posted by mm.abdollahzadeh (Post 409881)
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!

mm.abdollahzadeh November 27, 2013 07:39

Quote:

Originally Posted by zfaraday (Post 463652)
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

zfaraday November 27, 2013 14:30

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!


All times are GMT -4. The time now is 11:24.