CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Temperature table as boundary condition (https://www.cfd-online.com/Forums/openfoam-pre-processing/137078-temperature-table-boundary-condition.html)

Philipp Dietrich June 10, 2014 04:48

Temperature table as boundary condition
 
Hi,

I currently want to implement a boundary condition for a wall where the temperature is dependent on its position on this wall.
From another program I get a table for the temperature distribution along this wall.

Can anyone tell me how to implement such a boundary condition?
Thanks in advance for your effort.
Regards
Philipp

Btw. I am using openFoam 2.3.0

Tushar@cfd June 10, 2014 06:11

You can do either of these: (1) "codedFixedValue"; (2) "groovyBC"; in OpenFOAM.

I have never tried former patch, It seems bit difficult. I would suggest you to go for "groovyBC". (refer: http://openfoamwiki.net/index.php/Contrib/groovyBC)

Use any of these as per your requirement.

--
Best Luck!

dewey November 23, 2016 11:47

Hi

Did you find any way to do that?

I want to do something similar, a wall with certain temperature distribution along x.

jobin2600 February 19, 2020 19:11

Setting an equation(scalar temperature) as boundary condition
 
I was looking for the same and after some digging through the internet this is what did the job for me:

//setting a temperature equation: T = x - 0.5 along a boundary (top and bottom of a square cavity) ..in a natural convection simulation//

Code:

TopAndBottomWalls
    {
                type  codedFixedValue;
                value uniform 0.5;
                name myBC;
                code
                #{
                vector dir = vector(1, 0, 0);
                scalarField var = patch().Cf()&dir;
                operator==(var-.5);
                #};
 
        }



All times are GMT -4. The time now is 05:02.