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

[swak4Foam] groovyBC - PULSATIL PRESSURE

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2014, 01:18
Smile groovyBC - PULSATIL PRESSURE
  #1
Member
 
Tommy Sp
Join Date: Jan 2014
Posts: 51
Rep Power: 12
vitorspadeto is on a distinguished road
Can you tell me if my code is right?
My intention is to apply a pulsating pressure at the inlet with the FUNCION: P = A + A*sin(pi*time) , WHERE A=100 Pa (unit in Pa) .... NOTE that the units are [0 2 -2 0 0 0 0] on the description of p file.



This is my code:

Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    
    outlet
    {
        type fixedValue;
        value uniform 0;
    }
    

inlet
    {
     type            groovyBC;
     variables "var=100/1050;";
     valueExpression "(var+(var*sin(pi*time())))"; //*normal();
    }
 

wall
    {
        type extrapolatedPressure;
        value uniform 0;
    }
1- I divided "var" by 1050kg/m³(that is density of fluid). Am I right? WHERE A=100 Pa (unit in Pa) .... NOTE that the units are [0 2 -2 0 0 0 0]


2- I don't use "(var+(var*sin(pi*time())))*normal()" because I believe that pressure is not a vector. Am I right?


Best Regards,
Vitor Spadeto Venturin
vitorspadeto is offline   Reply With Quote

Old   September 7, 2014, 08:52
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by vitorspadeto View Post
Can you tell me if my code is right?
My intention is to apply a pulsating pressure at the inlet with the FUNCION: P = A + A*sin(pi*time) , WHERE A=100 Pa (unit in Pa) .... NOTE that the units are [0 2 -2 0 0 0 0] on the description of p file.



This is my code:

Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    
    outlet
    {
        type fixedValue;
        value uniform 0;
    }
    

inlet
    {
     type            groovyBC;
     variables "var=100/1050;";
     valueExpression "(var+(var*sin(pi*time())))"; //*normal();
    }
 

wall
    {
        type extrapolatedPressure;
        value uniform 0;
    }
1- I divided "var" by 1050kg/m³(that is density of fluid). Am I right? WHERE A=100 Pa (unit in Pa) .... NOTE that the units are [0 2 -2 0 0 0 0]


2- I don't use "(var+(var*sin(pi*time())))*normal()" because I believe that pressure is not a vector. Am I right?
Looks OK. Why are you asking? To check whether the BC does what you want without running the solver you can use replayTransientBC (which comes with swak)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider 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
Wind tunnel Boundary Conditions in Fluent metmet FLUENT 6 October 30, 2019 13:23
Outlet pressure aja1345 FLUENT 5 August 18, 2015 12:02
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
[swak4Foam] using of field pressure values at groovyBC immortality OpenFOAM Community Contributions 2 November 23, 2012 18:10
Unsteady pressure differential between inlet and outlet of the pipe for single phase joshi20h FLUENT 0 September 26, 2012 13:41


All times are GMT -4. The time now is 06:35.