CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   FixedValue of Temperature for a volume (http://www.cfd-online.com/Forums/openfoam-pre-processing/106061-fixedvalue-temperature-volume.html)

 m_f August 17, 2012 04:04

FixedValue of Temperature for a volume

Hello,

Problematic : Is it possible, with OpenFOAM, to define a fixed temperature for a volume (named cellzone) ?

Explication : My problem is that i have a box in a room. I define the temperature field in my box as :
Code:

```dimensions      [ 0 0 0 1 0 0 0 ]; internalField  uniform 353; boundaryField {     box_to_box2     {         type            compressible::turbulentTemperatureCoupledBaffleMixed;         value          uniform 353;         neighbourFieldName T;         K              solidThermo;         KName          none;     }     box_to_fluid     {         type            compressible::turbulentTemperatureRadCoupledMixed;         value          uniform 353;         Tnbr            T;         K              solidThermo;         QrNbr          Qr;         Qr              none;         KName          none;     } }```
The temperature of my fluid and of my box2 (in contact with box) is 293K. The temperature of my box is 353 K, and I want this temperature to be fixed. I want to study the radiation, forced convection (fluid with velocity) and conduction between fluid and theses two boxes.

But after 1 iteration, the fluid cool the box (293 vs 353), so the temperature of my box go down.

How can i fix the value in my box ? (I can't delete my interface ?!)

Thank you for any hint

Best regards.

m_f

Hi,
if you want temperature in your box fixed, then you do not need to model it! Simply, model box2 and fluid and where the box is, use a
Code:

```type  fixedValue; value  uniform 353;```
boundary condition!
could you add a picture of your problem thus everything is clearer?

 m_f August 23, 2012 08:34

1 Attachment(s)
Quote:
 Originally Posted by maddalena (Post 378297) Hi, if you want temperature in your box fixed, then you do not need to model it! Simply, model box2 and fluid and where the box is, use a Code: ```type  fixedValue; value  uniform 353;``` boundary condition!
Yes, but if I use this kind of bondary condition, is the heat transfert throw the interface will be calculated ?

Finally my goal is to calculate the heat transfert throw box1 faces, with wallHeatFlux (even if i don't know nowadays how it's work....:confused:).

I use topoSet and splitMeshRegion to create my boxes and my fluid meshes.
splitMeshRegion creates automatically my bondary as :
Code:

```For interface between region fluid and box2 added patches     6    fluid_to_box2     7    box2_to_fluid For interface between region pcb and box1 added patches     8    box2_to_box1     9    box1_to_box2 For interface between region fluid and box1 added patches     10    fluid_to_box1     11    box2_to_fluid```
Have I to create a new patch, without delete the others, which is the same as, for example, box1_to_box2, but with fixed temperature value ?
Or I have to modify an existing patch, to put fixed value ?

I'm a bit lost :/

Quote:
 could you add a picture of your problem thus everything is clearer?
I upload an image to be clearer.

Best regards,

m_f

I have never used wallHeatFux (even though I tried to...). However, calculating the heat transfer should not be a problem...
As for the case: you can delete the box mesh. Interfaces box_to_x can be defined as patch and you can use whenever bc you want on it.

 m_f August 23, 2012 09:05

Hello,
Quote:
 As for the case: you can delete the box mesh.
I can't delete the mesh inside the box1, I don't have to.

For information, bondaries of box1 are defined as :
Code:

```(     box1_to_box2     {         type            mappedWall;         nFaces          1444;         startFace      62396;         sampleMode      nearestPatchFace;         sampleRegion    box2;         samplePatch    box2_to_box1;         offsetMode      uniform;         offset          (0 0 0);     }     box1_to_fluid     {         type            mappedWall;         nFaces          3724;         startFace      63840;         sampleMode      nearestPatchFace;         sampleRegion    fluid;         samplePatch    fluid_to_box1;         offsetMode      uniform;         offset          (0 0 0);     } )```
Quote:
 Originally Posted by maddalena (Post 378329) However, calculating the heat transfer should not be a problem...
How calculate heat flux without wallHeatFlux ? :confused:

Best regards,

m_f

your fluid has "external" domains, right? your box1_to_x patch must be defined as that one. look at the boundary file and copy the definition (not the nFace startFace though!)

 m_f August 23, 2012 09:48

No, it's a internal fluid, in a kind of canalization. Sorry, i wasn't clear, there are walls all around the fluid, barring inlet and outlet.
But...It's work !
As you said, I modified some point :

All box1_to* or *to_box1 were modify :
Before :
Code:

```    box1_to_box2     {         type            compressible::turbulentTemperatureCoupledBaffleMixed;         value          uniform 353;         neighbourFieldName T;         K              solidThermo;         KName          none;     }     box1_to_fluid     {         type            compressible::turbulentTemperatureRadCoupledMixed;         value          uniform 353;         Tnbr            T;         K              solidThermo;         QrNbr          Qr;         Qr              none;         KName          none;     }```
After :
Code:

```    box1_to_box2     {         type            fixedValue;         value          uniform 353;     }     box1_to_fluid     {         type            fixedValue;         value          uniform 353;     }```
So I modify "T" file in /0/box1 , /0/box2 and /0/fluid. Nevertheless, the bondary still be mappedWall and not patch. The calcul is running, but It seems to work.

But, destroying the compressible::turbulentTemperatureRadCoupledMixed wall conditin to a fixedValue, Is the radiation effect of my box1 in the fluid destroy ? I don't really understand how Qr file is used...

Code:

```  Extract of /0/fluid/Qr :   "fluid_to_.*"   {         type            greyDiffusiveRadiationViewFactor;       emissivityMode  solidThermo; << Is solidThermo the material of the fluid or of the _.* ?       Qro            uniform 0;       value          uniform 0;   }```
Best regards,

m_f

 All times are GMT -4. The time now is 16:56.