CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Velocity Loss in simpleFoam, Turbulent Flow

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2018, 04:05
Default rhoSimpleFoam_Temperature
  #21
New Member
 
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 8
soheil_r7 is on a distinguished road
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).
Attached Images
File Type: png Residuals.png (161.4 KB, 3 views)
File Type: png boundaryC.png (181.9 KB, 2 views)
File Type: jpg Fluent.jpg (52.0 KB, 3 views)
File Type: png T_OpenFoam.png (66.5 KB, 1 views)
Attached Files
File Type: zip compressbileSimulation.zip (12.4 KB, 0 views)
soheil_r7 is offline   Reply With Quote

Old   January 16, 2018, 09:57
Default
  #22
Member
 
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 5
Alasir is on a distinguished road
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.
soheil_r7 likes this.

Last edited by Alasir; January 16, 2018 at 10:58.
Alasir is offline   Reply With Quote

Old   January 16, 2018, 10:51
Default
  #23
Senior Member
 
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 127
Rep Power: 8
Taataa is on a distinguished road
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);
            }
        #};
    }
You can use the same idea for any other field.

Another approach would be use a non-uniform list. You can take a look at this thread.
soheil_r7 likes this.
Taataa is offline   Reply With Quote

Reply

Tags
simplefoam, velocity

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 07:31
3-D parabolic velocity Inlet - Steady state - UDF Turbulent Flow mohibanwar Fluent UDF and Scheme Programming 10 May 18, 2015 10:34
How to get a plot of fluctuating velocity component{u'(t)} in a turbulent flow TQIM STAR-CCM+ 7 November 11, 2014 10:22
Time averaged velocity in turbulent pipe flow tsero FLUENT 1 November 2, 2012 03:19
Turbulent flow through a pipe with variable inlet velocity lobstar OpenFOAM Running, Solving & CFD 8 March 28, 2012 11:15


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