|
[Sponsors] |
January 16, 2018, 05:05 |
rhoSimpleFoam_Temperature
|
#21 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Hello again,
I am working on the same geometry, this time in a compressible form and rhoSimpleFoam solver. All I want to see is a regular change in Temperature contours. Temperature changes very well at the top. But it does not change at the bottom. My professor did the same simulation with Fluent and she got the result (picture attached)..Wants me to generate the same results with openfoam. She added UDF for T…something like: T=295+0.05z. But I can’t implement that in OpenFoam. First question; is there any way to apply a boundary condition as an equation in OpenFOAM? In a way that temperature changes according to the Z direction (height of the domain). Another question is..How we can implement something like the equation below in OpenFoam: U_BL=0.2/0.4*log(z/0.163). It is for Fluent UDF. I would be thankful for any help and suggestion guys. (Files and pictures are attached). |
|
January 16, 2018, 10:57 |
|
#22 |
Member
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9 |
Ouch. Im sorry, but I dont know if any of the "standard" boundary conditions will be off much use to you here.
There are possibilities, however. You could program, or find someone that allready have programmed, a special boundary condition function that solves this. I know that I've once seen something similar done for a parabolic velocity inlet (in order to get a laminar flow in to a channel). Searching for that might help you on your way. A second option is to define the boundary condition as a fixed list. This would manually give a specific value for each cell on the boundary. Then you could simply pre-calcualte the value for the function at each cell. This ofcoarse is practically impossible on a large mesh, unless you write some program to do it for you. It will also be horribly problematic to update if conditions change. I fear I can't be of more help here. Last edited by Alasir; January 16, 2018 at 11:58. |
|
January 16, 2018, 11:51 |
|
#23 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
It sure is possible. There are couple of approaches, the most flexible one using coded. Here what I did to achieve a parabolic boundary condition for velocity:
Code:
inlet { type codedFixedValue; value uniform (0 0 0); redirectType parabolaProfile; code #{ const fvPatch& boundaryPatch = patch(); const vectorField& Cf = boundaryPatch.Cf(); vectorField& field = *this; scalar uave = 10; scalar h = 5e-3; scalar vel; forAll(Cf, faceI) { vel = 6 * uave / (h*h) * (h * Cf[faceI].y() - Cf[faceI].y() * Cf[faceI].y()); field[faceI] = vector(vel, 0, 0); } #}; } Another approach would be use a non-uniform list. You can take a look at this thread. |
|
Tags |
simplefoam, velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 08:31 |
3-D parabolic velocity Inlet - Steady state - UDF Turbulent Flow | mohibanwar | Fluent UDF and Scheme Programming | 10 | May 18, 2015 11:34 |
How to get a plot of fluctuating velocity component{u'(t)} in a turbulent flow | TQIM | STAR-CCM+ | 7 | November 11, 2014 11:22 |
Time averaged velocity in turbulent pipe flow | tsero | FLUENT | 1 | November 2, 2012 04:19 |
Turbulent flow through a pipe with variable inlet velocity | lobstar | OpenFOAM Running, Solving & CFD | 8 | March 28, 2012 12:15 |