CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Regarding difference in boundary conditions

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By LuckyTran
  • 2 Post By LuckyTran
  • 1 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 27, 2021, 06:01
Default Regarding difference in boundary conditions
  #1
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Hello guys,
when I ran the test cases of dam break and sloshing tank problem sloshing tank has 2 different boundary conditions for Pressure(i. e P_rgh ,P). BUT DAM BREAK has only one boundary condition for P. Can anyone tell me why this is done? I know both are made for different solvers but why two boundary conditions for P in sloshing tank?


Thanks in advance.
saicharan662000@gmail.com is offline   Reply With Quote

Old   December 27, 2021, 06:24
Default
  #2
New Member
 
CE
Join Date: Jul 2021
Posts: 12
Rep Power: 5
orss_st is on a distinguished road
i have the same problem
orss_st is offline   Reply With Quote

Old   December 27, 2021, 06:26
Default
  #3
New Member
 
CE
Join Date: Jul 2021
Posts: 12
Rep Power: 5
orss_st is on a distinguished road
i have the same problem
orss_st is offline   Reply With Quote

Old   December 27, 2021, 13:55
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
p doesn't have boundary conditions, they're all type calculated.
LuckyTran is offline   Reply With Quote

Old   December 27, 2021, 23:42
Default
  #5
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Hello luckyTran,
If p are all type calculated then why dam break problem had only p_rgh in 0 folder. And sloshing tank has p,p_rgh in zero folder ?
Thanks and regards
saicharan662000@gmail.com is offline   Reply With Quote

Old   December 28, 2021, 01:15
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Because potentialFreeSurfaceFoam needs a way to set the reference pressure consistently for both the total pressure and the hydraulic pressure. In interFoam, that job is fulfilled by rho.
LuckyTran is offline   Reply With Quote

Old   December 28, 2021, 01:48
Default
  #7
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Hello Lucky,
Can you please explain it in more detail.

Thanks in advance
saicharan662000@gmail.com is offline   Reply With Quote

Old   December 28, 2021, 03:04
Default
  #8
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
All the details you can ever hope for are in createFields.H and pEqn.H

Code:
Info<< "Reading field p (kinematic)\n" << endl;
volScalarField p
(
    IOobject
    (
        "p",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

Info<< "Reading field U\n" << endl;
volVectorField U
(
    IOobject
    (
        "U",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

#include "createPhi.H"

singlePhaseTransportModel laminarTransport(U, phi);

autoPtr<incompressible::momentumTransportModel> turbulence
(
    incompressible::momentumTransportModel::New(U, phi, laminarTransport)
);

#include "readGravitationalAcceleration.H"

Info<< "Creating field zeta\n" << endl;
volVectorField zeta
(
    IOobject
    (
        "zeta",
        runTime.timeName(),
        mesh,
        IOobject::READ_IF_PRESENT,
        IOobject::AUTO_WRITE
    ),
    mesh,
    dimensionedVector(dimLength, Zero)
);

Info<< "Creating field p_gh\n" << endl;
volScalarField p_gh
(
    IOobject
    (
        "p_gh",
        runTime.timeName(),
        mesh,
        IOobject::MUST_READ,
        IOobject::AUTO_WRITE
    ),
    mesh
);

// Force p_gh to be consistent with p
// Height is made relative to field 'refLevel'
p_gh =  p - (g & mesh.C());

pressureReference pressureReference(p_gh, pimple.dict());

mesh.setFluxRequired(p_gh.name());

#include "createMRF.H"
#include "createFvModels.H"
#include "createFvConstraints.H"
Specifically the two lines of importance are:


Code:
p_gh =  p - (g & mesh.C());


 pressureReference pressureReference(p_gh, pimple.dict());
The only other call to p is in the final line of pEqn.H where it is recalculated from elevation and hydraulic pressure.

Code:
p = p_gh + (g & mesh.C());
p never gets used in any equation and therefore does not need boundary conditions. That's why all its types are calculated in the tutorial. On the other hand, p_gh does have a solver and therefore needs boundary conditions. At the same time, p_rgh is the dynamic variable in interFoam and there needs boundary conditions.
LuckyTran is offline   Reply With Quote

Old   December 28, 2021, 03:49
Default
  #9
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Hello Lucky,
But we have 'P' in in tutorials of compressibleInterfoam in zero folder . Why do we have it?
Thanks and Regards
saicharan662000@gmail.com is offline   Reply With Quote

Old   December 28, 2021, 16:23
Default
  #10
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
And? What's your point? p in compressibleInterFoam also does not have any boundary conditions.
LuckyTran is offline   Reply With Quote

Old   December 28, 2021, 22:05
Default
  #11
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com is on a distinguished road
Why do we need to set a special reference to P in compressible interfoam tutorial cases? There is no special reference for p in test cases of interfoam in zero folder.
Thanks and regards.
saicharan662000@gmail.com is offline   Reply With Quote

Old   December 29, 2021, 02:29
Default
  #12
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Because compressibleInterFoam is compressible and uses a non-incompressible thermophysical model. Equations of states are based off of p and T (and not p_gh/p_rgh).


Please don't ask why there is a T in compressibleInterFoam and not in interFoam. God forbid people develop solvers that do more things. Just stick to interFoam if you're that lost.
LuckyTran is offline   Reply With Quote

Old   December 29, 2021, 03:03
Default
  #13
New Member
 
hari
Join Date: Nov 2019
Posts: 9
Rep Power: 7
Saicharan is on a distinguished road
I am not that blind to ask why T is in compressible interfoam. I know compressible interfoam solver solves for energy equation. Anyway thanks for help lucky tran
Saicharan is offline   Reply With Quote

Old   December 29, 2021, 16:36
Default
  #14
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Let me make this even clearer since I don't think you actually get it yet. Even if there was no energy equation (just like there is no equation for p) you would still need to supply a T field simply because the thermophsysical model you are using asks for one (in compressibleInterFoam anyway). Energy equation means you need to provide boundary conditions for the variable, yes. But there are other reasons for providing a field
Saicharan likes this.
LuckyTran is offline   Reply With Quote

Old   December 29, 2021, 22:31
Default
  #15
New Member
 
hari
Join Date: Nov 2019
Posts: 9
Rep Power: 7
Saicharan is on a distinguished road
Hello lucky,
Now I get it.
Thank you for patiently explaining things for me.
Saicharan is offline   Reply With Quote

Reply

Tags
opeanfoam, openfoam 8


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
UDF for Automatic Solution Initialization for previous case data file gartz89 Fluent UDF and Scheme Programming 6 March 30, 2020 08:38
Wrong multiphase flow at rotating interface Sanyo CFX 14 February 7, 2017 18:19
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 11:20
Problem with SIMPLEC-like finite volume channel flow boundary conditions ghobold Main CFD Forum 3 June 15, 2015 12:14
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05


All times are GMT -4. The time now is 16:39.