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

uniformValue table meaning in propeller tutorial

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2015, 21:20
Default uniformValue table meaning in propeller tutorial
  #1
Member
 
Al
Join Date: Jul 2013
Location: Japan
Posts: 47
Blog Entries: 3
Rep Power: 14
donQi is on a distinguished road
Dear all,

is my following interpretation correct?

Code:
    inlet
	{
		type uniformFixedValue;
		uniformValue table
		(
			(0 (0 0 0))
			(0.01 (0 -15 0))
			(100 (0 -15 0))
		);
		value $internalField;
	}
[extract from openfoam231/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/0.org/U]

the meaning is :
- from time 0 to 0.01s the velocity varies linearly from 0 to -15m/s
- from time 0.01 to 100s the velocity stays constant at -15m/s

right?

thank you in advance
donQi
donQi is offline   Reply With Quote

Old   March 10, 2015, 08:20
Default
  #2
Senior Member
 
Join Date: Jan 2015
Posts: 150
Rep Power: 11
Svensen is on a distinguished road
Yes, it's correct for the velocity component (Y). X and Z stays as zeros
Svensen is offline   Reply With Quote

Old   October 29, 2022, 09:32
Default
  #3
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 133
Rep Power: 6
Sakun is on a distinguished road
Hi,


i know this a old thread but can i apply this "table" condition for compressible cases ? specially for pressure ?


thank you,
Sakun is offline   Reply With Quote

Old   October 31, 2022, 04:32
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,198
Rep Power: 27
Yann will become famous soon enough
Hi,

Sure you can, as long as you adapt the syntax (scalar instead of vector).
There are several BC which can be used with tables, depending on the OpenFOAM version you are using.

Regards
Yann
Yann is offline   Reply With Quote

Old   October 31, 2022, 06:26
Default
  #5
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 133
Rep Power: 6
Sakun is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi,

Sure you can, as long as you adapt the syntax (scalar instead of vector).
There are several BC which can be used with tables, depending on the OpenFOAM version you are using.

Regards
Yann

Hi Yann,


Thank you very much for your kind reply,


I am using openFOAM v2112, This is my "p" file in my simulation so i need to give pressure gradually for the simulation, Since i am having unstable pressure condition


I am really grateful if you can help me on this



Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 97251;

boundaryField
{
    INLET
    {
        //type            freestreamPressure;
        //freestreamValue uniform $pOut;

        type            totalPressure;
        p0                uniform 115775;
        value           uniform 115775;

        // Optional entries
           U               U;
        phi             phi;
        rho             rho;
    
        //type            fixedValue;
        //value           uniform 84636.34;
    }

    OUTLET
    {
         //type            freestreamPressure;
        //freestreamValue $internalField;    
            
        type            fixedValue;
        value           uniform 97251;

        
        //type            fixedFluxPressure;
    
    }

    CASCADE
    {
        type            zeroGradient;
    }

    "(TOP|BOTTOM)"
    {
        type            cyclicAMI;
    }

    frontAndBackPlanes
    {
        type            empty;
    }
}


// ************************************************************************* //
Sakun is offline   Reply With Quote

Old   October 31, 2022, 07:00
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,198
Rep Power: 27
Yann will become famous soon enough
Something like this should do the job, up to you to adjust it to your needs:

Code:
OUTLET
{
	type	uniformFixedValue;
	uniformValue	table
	(
		(0 0)
		(0.01 97251)
		(100 97251)
	);
	value	$internalField;
}
If you intend to ramp the inlet pressure, there is also a boundary condition named uniformTotalPressure to be able to define a table for p0.

Cheers,
Yann
Yann is offline   Reply With Quote

Old   October 31, 2022, 08:02
Default
  #7
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 133
Rep Power: 6
Sakun is on a distinguished road
Quote:
Originally Posted by Yann View Post
Something like this should do the job, up to you to adjust it to your needs:

Code:
OUTLET
{
    type    uniformFixedValue;
    uniformValue    table
    (
        (0 0)
        (0.01 97251)
        (100 97251)
    );
    value    $internalField;
}
If you intend to ramp the inlet pressure, there is also a boundary condition named uniformTotalPressure to be able to define a table for p0.

Cheers,
Yann

so adjusted total pressure to uniform total pressure bc as below,
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 97251;

boundaryField
{
    INLET
    {
        //type            freestreamPressure;
        //freestreamValue uniform $pOut;

    /*    type            totalPressure;
        p0                uniform 115775;
        value           uniform 115775;

        // Optional entries
           U               U;
        phi             phi;
        rho             rho;
    */
        //type            fixedValue;
        //value           uniform 84636.34;

        type            uniformTotalPressure;
        p0              table
        (
            (0 10000)
            (100 20000)
            (500 30000)
            (1000 40000)
            (2000 50000)
            (3000 60000)
            (4000 70000)
            (5000 80000)
            (6000 90000)
            (7000 100000)
            (8000 110000)
            (9000 115775)
        );

    }

    OUTLET
    {
         //type            freestreamPressure;
        //freestreamValue $internalField;    
            
        type            fixedValue;
        value           uniform 97251;

        
        //type            fixedFluxPressure;
    
    }

    CASCADE
    {
        type            zeroGradient;
    }

    "(TOP|BOTTOM)"
    {
        type            cyclicAMI;
    }

    frontAndBackPlanes
    {
        type            empty;
    }
}


// ************************************************************************* //

when i running the simulation i realize pressure is already too high in paraview,

when its meant to be in a range of 70000-80000 pa between 3000- to 4000 iterations according to the table.


does this mean inserting the table for total pressure is not working or do i have to do the table values for the fixedvalues as well.
Attached Images
File Type: jpg p.jpg (65.9 KB, 18 views)
Sakun is offline   Reply With Quote

Old   October 31, 2022, 09:11
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,198
Rep Power: 27
Yann will become famous soon enough
Are you sure the pressure is too high?
It is not very clear on your screenshot but the inlet pressure seems to be close to what you are expecting. To make sure you can load only your inlet patch in paraview and check the pressure values.

If your concern is related to what is going on inside the domain, then this is another topic (your boundary condition only defines values on the boundary).

Does it make sens to start your simulation with a total pressure of 10000 Pa at the inlet while you already have a fixed static pressure of 97251 Pa at the outlet?

A better approach would probably be to start with a pressure drop close to zero and increase inlet pressure up to the pressure drop you aim for.

Regards,
Yann
Yann is offline   Reply With Quote

Old   October 31, 2022, 09:46
Default
  #9
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 133
Rep Power: 6
Sakun is on a distinguished road
Quote:
Originally Posted by Yann View Post
Are you sure the pressure is too high?
It is not very clear on your screenshot but the inlet pressure seems to be close to what you are expecting. To make sure you can load only your inlet patch in paraview and check the pressure values.

If your concern is related to what is going on inside the domain, then this is another topic (your boundary condition only defines values on the boundary).

Does it make sens to start your simulation with a total pressure of 10000 Pa at the inlet while you already have a fixed static pressure of 97251 Pa at the outlet?

A better approach would probably be to start with a pressure drop close to zero and increase inlet pressure up to the pressure drop you aim for.

Regards,
Yann

apologies for the low quality picture.

you are correct actually, it seems inlet p is in the range of 100000 and 120000.

i attached a picture of inlet pressure bc contour.



i have posted (1 & 2 below) my problem in the forum months ago but did not get a reply since


1) How to inset 2 different pressure values in "p" file


2) Static and Total Pressure Values are Same at the Compressor Blade




Quote:
Does it make sens to start your simulation with a total pressure of 10000 Pa at the inlet while you already have a fixed static pressure of 97251 Pa at the outlet?

A better approach would probably be to start with a pressure drop close to zero and increase inlet pressure up to the pressure drop you aim for.
as for this statement , are you suggesting that i should start the simulation as below, as an example,


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 97251;

boundaryField
{
    INLET
    {
        //type            freestreamPressure;
        //freestreamValue uniform $pOut;

    /*    type            totalPressure;
        p0                uniform 115775;
        value           uniform 115775;

        // Optional entries
           U               U;
        phi             phi;
        rho             rho;
    */
        //type            fixedValue;
        //value           uniform 84636.34;

        type            uniformTotalPressure;
        p0              table
        (
            (0 50)
            (100 100)
            (200 500)
            (300 1000)
            (500 2000)
            (1000 4000)
            (2000 6000)
            (4000 8000)
            (6000 10000)
            (7000 20000)
            (8000 30000)
            (9000 40000)
            (10000 50000)
            (11000 60000)
            (12000 70000)
            (13000 80000)
            (14000 90000)
            (15000 100000)
            (16000 110000)
            (18000 115775)
        );

    }

    OUTLET
    {
         //type            freestreamPressure;
        //freestreamValue $internalField;    
            
        type            fixedValue;
        value           uniform 97251;

        
        //type            fixedFluxPressure;
    
    }

    CASCADE
    {
        type            zeroGradient;
    }

    "(TOP|BOTTOM)"
    {
        type            cyclicAMI;
    }

    frontAndBackPlanes
    {
        type            empty;
    }
}


// ************************************************************************* //


Again i am really thankful for you for supporting me in this case ,casue you are the only person who replied for this issue.
Attached Images
File Type: jpg INLET_p.jpg (62.6 KB, 13 views)
Sakun is offline   Reply With Quote

Old   November 2, 2022, 04:46
Default
  #10
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,198
Rep Power: 27
Yann will become famous soon enough
Hi Sakun,

On you screenshot, the pressure on the inlet patch is 115775 Pa, which is the total pressure value your assigned in your boundary condition (p0=115775 Pa is the last line of your table).

Do you get any flow inside your domain? What velocity do you get at inlet?

Regards,
Yann
Yann is offline   Reply With Quote

Old   November 2, 2022, 18:55
Default
  #11
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 133
Rep Power: 6
Sakun is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi Sakun,

On you screenshot, the pressure on the inlet patch is 115775 Pa, which is the total pressure value your assigned in your boundary condition (p0=115775 Pa is the last line of your table).

Do you get any flow inside your domain? What velocity do you get at inlet?

Regards,
Yann

Understood, really appriciate for the guidence.


p File,


Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 97251;

boundaryField
{
    INLET
    {
        //type            freestreamPressure;
        //freestreamValue uniform $pOut;

        type            totalPressure;
        p0                uniform 115775;
        value           uniform 115775;
    
        //type            fixedValue;
        //value           uniform 84636.34;
    }

    OUTLET
    {
         //type            freestreamPressure;
        //freestreamValue $internalField;    
            
        type            fixedValue;
        value           uniform 97251;
    }

    CASCADE
    {
        type            zeroGradient;
    }

    "(TOP|BOTTOM)"
    {
        type            cyclicAMI;
    }

    frontAndBackPlanes
    {
        type            empty;
    }
}


// ************************************************************************* //

U File,


Code:
/*--------------------------------*- C++ -*----------------------------------* \
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    INLET
    {
        //type            pressureInletOutletVelocity;
        //value           uniform $Uinlet;

        //type            freestreamVelocity;
        //freestreamValue uniform $Uinlet;
        //value           uniform $Uinlet;
    
        //type            fixedValue;
        //value           uniform (232.43 20.34 0);
        
        type pressureDirectedInletVelocity;
        inletDirection uniform (0.631623456 -0.775275312 0); //geometric inlet angle is 50.83
        value uniform (0 0 0);
    }

    OUTLET
    {
        //type           inletOutlet;
        //inletValue    uniform (0 0 0);
        //value         $internalField;

        //type            zeroGradient;
        
        type            pressureInletOutletVelocity;
        value           $internalField;
    }

    CASCADE
    {
        type            noSlip;
    }
    
    "(TOP|BOTTOM)"
    {
        type            cyclicAMI;
    }

    frontAndBackPlanes
    {
        type            empty;
    }

    
}


// ************************************************************************* //

I am running the simulation using only pressure values. (tot_pressure=115775 and static_pressure=97251)


Even though paper has mentioned(attached picture) that, there is a 0.7 mach speed at the inlet, i did not apply to the U file because i do not have the speed of sound for that particular mach number.



Thank you,


Regards,
Sakun
Attached Images
File Type: jpg paper_values.jpg (193.4 KB, 12 views)
Sakun is offline   Reply With Quote

Old   November 3, 2022, 04:35
Default
  #12
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,198
Rep Power: 27
Yann will become famous soon enough
Hi,

Sure you cannot impose both pressure and velocity values at the inlet. What I meant was: have you checked the velocity computed at the inlet and what values do you get there?

Yann
Yann is offline   Reply With Quote

Old   November 3, 2022, 08:54
Default
  #13
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 133
Rep Power: 6
Sakun is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi,

Sure you cannot impose both pressure and velocity values at the inlet. What I meant was: have you checked the velocity computed at the inlet and what values do you get there?

Yann
Hello Yann,

I attached a picture of INLET before the divergence and velocity was 3.6 m/s.

and the other picture was the velocity at the INLET when i continue the simulation even after the divergence, which has a velocity of 160 m/s.

Thank you,

Best regards,
Attached Images
File Type: jpg inlet_velocity_before_divergence.jpg (61.8 KB, 7 views)
File Type: jpg inlet_velocity_AFTER_divergence.jpg (60.4 KB, 6 views)
Sakun is offline   Reply With Quote

Reply


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
Problem on Fluent Tutorial: Horizontal Film Boilig Feng FLUENT 2 April 13, 2013 06:34
propeller tutorial openfoam_user OpenFOAM Running, Solving & CFD 0 February 8, 2012 05:02
Looking for tutorial for rotating propeller for Marine Applications naimishharpal STAR-CCM+ 0 February 7, 2011 23:12
a propeller 2 way fsi kantored CFX 9 April 11, 2007 15:51
Propeller thrust at diff. advance ratio (CFX 5.7) Zoltan CFX 9 April 27, 2005 09:23


All times are GMT -4. The time now is 03:12.