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

Add P_rgh to solver with P

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2019, 11:57
Default Add P_rgh to solver with P
  #1
Member
 
Ramin
Join Date: Oct 2015
Posts: 33
Rep Power: 10
rmn_990 is on a distinguished road
Hi,
I have an incompressible case and this case has some problems with pressure outlet bounday condition.
it is just a duct with an velocity inlet and an pressure outlet.


I asked a friend why the outlet works like this and I got this message:

MPPICFoam/DPMFoam are incompressible solvers so you could use the uniformDensityHydrostaticPressure. However this is not as accurate or reliable as using p_rgh for strongly buoyant flows so you could change these solvers to solve for p_rgh or fund this development.

I tried uniformDensityHydrostaticPressure but it didn't work. Now, I want to add p_rgh instead of p in my solver.

Do you have any idea of what should I do?
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ 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 fixedValue;
        value uniform (0.5 0 0);
        //phi phi.water;
        //alpha alpha.water; 
    }

    outlet
    {
        type zeroGradient;
        /*
        type inletOutlet;
        phi phi.water;
        inletValue uniform (0 0 0);
        value uniform (0 0 0);
        */
    }
    
    upperWall
    {
        type noSlip;
        /*
        type inletOutlet;
        phi phi.water;
        inletValue uniform (0 0 0);
        value uniform (0 0 0);
        */
        
    }

    walls
    {
        type noSlip;
    }
    
    sides
    {
        type noSlip;
    }
}

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

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

internalField uniform 0;

boundaryField
{
    inlet
    {
        type fixedFluxPressure;
        phi phi.water;
        value $internalField;
    }

    outlet
    {
        type fixedValue;
        value uniform 0;;
        //phi phi.water;
        //value $internalField;
    }
    
    upperWall
    {
        type zeroGradient;
    }
    walls
    {
        type zeroGradient;
        /*
        type fixedFluxPressure;
        phi phi.water;
        value $internalField;
        */
    }

    sides
    {
        type zeroGradient;
        /*
        type fixedFluxPressure;
        phi phi.water;
        value $internalField;
        */
    }
}

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

Last edited by wyldckat; May 1, 2019 at 10:24. Reason: Added [CODE][/CODE] markers
rmn_990 is offline   Reply With Quote

Old   April 2, 2019, 22:39
Default
  #2
Member
 
Join Date: Feb 2016
Posts: 41
Rep Power: 10
LeeRuns is on a distinguished road
Dry but why not use the incompressible solvers for you incompressible case?
LeeRuns is offline   Reply With Quote

Old   April 5, 2019, 17:18
Default
  #3
Member
 
Ramin
Join Date: Oct 2015
Posts: 33
Rep Power: 10
rmn_990 is on a distinguished road
Quote:
Originally Posted by LeeRuns View Post
Dry but why not use the incompressible solvers for you incompressible case?
Thanks for your response. I think I used most of the boundary conditions and none of them works.
What's your suggestion?
rmn_990 is offline   Reply With Quote

Old   May 1, 2019, 10:53
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
A few quick answers/questions:
  1. In the first post, the boundary condition for "p" at the inlet is wrong:
    Code:
        inlet
        {
            type fixedFluxPressure;
            phi phi.water;
            value $internalField;
        }
    If the solver is incompressible, then you should not use buoyancy dependent boundary conditions:
    Code:
        inlet
        {
            type zeroGradient;
        }
  2. Why exactly is your flow is buoyant? What is the mechanism that is making it work that way?
    • I ask this, just in case you were misguided somewhere along the development of your project... perhaps the flow is not buoyant by nature and only the particles are inducing a distortion to the flow?
rmn_990 likes this.
__________________
wyldckat is offline   Reply With Quote

Old   May 1, 2019, 14:36
Default
  #5
Member
 
Ramin
Join Date: Oct 2015
Posts: 33
Rep Power: 10
rmn_990 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
A few quick answers/questions:
  1. In the first post, the boundary condition for "p" at the inlet is wrong:
    Code:
        inlet
        {
            type fixedFluxPressure;
            phi phi.water;
            value $internalField;
        }
    If the solver is incompressible, then you should not use buoyancy dependent boundary conditions:
    Code:
        inlet
        {
            type zeroGradient;
        }
  2. Why exactly is your flow is buoyant? What is the mechanism that is making it work that way?
    • I ask this, just in case you were misguided somewhere along the development of your project... perhaps the flow is not buoyant by nature and only the particles are inducing a distortion to the flow?
Thanks for your response Bruno.
I tried the boundary condition that you proposed and I can see the problem with outlet boundary condition.
Flow is incompressible and the length of the control volume is less than 10cm. Reynolds number is around 10 and 9.81 gravity.
As far as the dimension is small and also Re is low, I thought that maybe we have buoyant flow. I did this simulation with MPPICInterFoam (with one phase) and everything works well because it works with p_rgh.

I am sure that particles don't have any role in this disturbtion becasue I didn't inject any particle at this stage and I just used MPPICFoam solver.
rmn_990 is offline   Reply With Quote

Reply

Tags
buoyancy, dpmfoam, mppicfoam, openfoam


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
[waves2Foam] Add user defined gauges in waveFoam Lewis Liang OpenFOAM Community Contributions 3 October 18, 2020 10:32
Is it possible to add massless particles to an incompressible flow at solver level? LauraSumner OpenFOAM Running, Solving & CFD 1 September 30, 2019 17:13
how to modify a solver to add a disturbance goodkid OpenFOAM 2 June 25, 2011 04:35
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
How to add temperature to cavitatingFoam solver chodki-c OpenFOAM 9 September 30, 2010 11:21


All times are GMT -4. The time now is 22:04.