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 |
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 |
Quote:
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 |
Thanks Mahdi.
What should be the values for refVal and valuefraction, as both T1 and T2 are unknown !! Please let me know !! Regards Vishal |
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:
|
Quote:
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 |
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:
|
Quote:
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. |
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:
|
Quote:
A quick question on the notation of "q/(k1/DeltaY1)/DeltaY1", you meant "q*DeltaY1/(k1/DeltaY1)" or "q/(k1/(DeltaY1*DeltaY1)) Regards Vishal |
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:
|
Quote:
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 |
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:
|
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 |
Quote:
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 |
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 |
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 |
Quote:
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! |
Quote:
turbulentTemperatureCoupledBaffle enjoy |
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:38. |