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

Defined pressure gradient between two fluid regions

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2022, 23:11
Default Defined pressure gradient between two fluid regions
  #1
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 107
Rep Power: 5
dasith0001 is on a distinguished road
Hi Formers,

I have this question for some time and I could not yet figure out a way to do it. Here is my question.

1. There is two fluid domains with same thermophysical properties. Each fluid domain can have a inlet and a outlet. (fluid domains should have at lease one external boundary)

2. Two domains are physically connected by a narrow channel.

3. I want to define a pressure gradient between the internal surfaces of the narrow channel. ( so that the narrow channel basically acts as a relief valve).

Could you suggest me an any direction setting up such a case? Or is it even possible to do this in OpenFoam ? Your help is greatly appreciated.

Thank you.
Dasith
dasith0001 is online now   Reply With Quote

Old   March 13, 2022, 14:33
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
I do not quite understand what you mean by two domains...do you mean two separate solvers? Or just two physically separate regions, but with a channel between them. Hence fully connected.

You can set a pressure gradient inside your domain using fvOptions...e.g semiImplicitSource or directionalPressureGradientExplicitSource

You might want to look into baffles (zero thickness walls) if you are talking about two domains, with a wall like interface between them. If those domains are somehow separate, but the same solver. Otherwise something like the multiple world coupling allows coupling several solvers (i think this was introduced in v2012)


So do you want to set this pressure gradient as a boundary condition or as a volumetric source term?
Bloerb is offline   Reply With Quote

Old   March 15, 2022, 23:57
Default
  #3
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 107
Rep Power: 5
dasith0001 is on a distinguished road
Hi Bloerb,

Thank you very much for your response.

sorry for the confusion, it is just two physically separated regions but with a channel between them. So you are right, just one fluid region.

I have been abled to follow on the ''directionalPressureGradientExplicitSource'' with fvOptions. created a faceZone to accommodate the pressure gradient.

No, I am not interested in the velocity so I set it up as a constant pressureDrop.

Please see the fvOptions file, the model just stops running at the first time step without giving an error. Please see the following fvOption

PHP Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class 
dictionary;
location "constant";
object fvOptions;
}


reliefValve1
{
    
type                 directionalPressureGradientExplicitSource;
    
active            on;

    
directionalPressureGradientExplicitSourceCoeffs

    
{
    
selectionMode          all//cellZone; //all;
    
faceZone          valveR;
    
fields              (U);
    
flowDir              (0 0 1);
    
relaxationFactor      0.3;
    
model               constant//DarcyForchheimer;
    
    //constant model
    
pressureDrop          1216;    //;

    
}
}

// ************************************************************************* // 
Is something wrong with the fvOptions file?

I highly appreciate your help, thank you.

Best Regards,
Dasith
dasith0001 is online now   Reply With Quote

Old   March 16, 2022, 14:01
Default
  #4
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
You should probably not use all but apply the pressure gradient only in the small region. Hence define a cellZone where the pressure gradient should be added.
Bloerb is offline   Reply With Quote

Old   March 16, 2022, 20:14
Default
  #5
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 107
Rep Power: 5
dasith0001 is on a distinguished road
Hi Bloerb,

Thank you very much for the quick reply.
I am still relatively new to OpenFoam and your directions on this highly appreciated.

I tried to set the a cellZone with cellSet but I have not been successful so far.

Please correct me if I am wrong.

I have already define fluid region in topoSet (say regionA).

I want to define a sub region within regionA, say region 'channel'.

In the toposet file I have tried it with 'subset' but I could not define a cellzone named 'channel' with the regionA.

It is much appreciated if you could direct me to a example or for any suggestions. my subset looks like this
PHP Code:
   {
        
name    channelCellSet// chamberTop Section top
        
type    cellSet;
        
action  new;
        
source  cylinderToCell;
        
p1      (0 0 0.736); //
        
p2      (0 0 0.730); // bottom centre 0.686
        
radius   0.028//   =0.028 - 0.001
        
innerRadius 0.001;
    }

    {
        
name    channel;
        
type    cellZoneSet;
        
action  new;
        
source  setToCellZone;
        
set     channelCellSet;
    }

    {
        
name channel;
        
type cellSet;;
        
action subset;
        
source cellToCell;
        
sourceInfo
        
{
            
name "regionA";
        }
    } 
I could not find much literature on this. I tried with couple of other combinations but either topoSet or splitMeshRegions or both don't like it.

Thanks,
Dasith
dasith0001 is online now   Reply With Quote

Reply

Tags
constant pressure drop

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
UDF for zero pressure gradient at BC outlet ghordog Fluent UDF and Scheme Programming 1 April 28, 2022 05:12
Same pressure gradient but different velocity field TurbJet Main CFD Forum 22 April 28, 2018 03:35
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 14:32
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
Maintaining Static Pressure at Fluid Flow Inlet cdevalve FLUENT 3 January 14, 2012 00:11


All times are GMT -4. The time now is 20:00.