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

fvOptions for constant pressure gradient

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By agustinvo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 21, 2017, 05:42
Default fvOptions for constant pressure gradient
  #1
Member
 
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9
Alasir is on a distinguished road
Hi

I want to start of a channel as 0 at all places, cyclic inlet and outlet, but with a constant dP/dx pressure gradient so that the fluid eventually approach a steady flow.

Anyone know how to do this using the fvOptions file?
Alasir is offline   Reply With Quote

Old   November 21, 2017, 10:07
Default
  #2
Member
 
hulli graemer
Join Date: Oct 2014
Posts: 48
Rep Power: 12
hulli is on a distinguished road
Hi man

I never did it with pressure but with velocity i.e. Ubar Best H
:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

momentumSource
{
type meanVelocityForce;
active yes;

meanVelocityForceCoeffs
{
selectionMode all;

fieldNames (U);
Ubar (0.335 0 0);
}
}


// ************************************************** *********************** //
hulli is offline   Reply With Quote

Old   November 21, 2017, 10:53
Default
  #3
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Hello Anders,
just follow Hullis example. Besides, for OpenFOAM 5.0, it has to read
fields (U); instead of fieldNames (U);
Works with transient, as well as with steady-state flows.
RobertHB is offline   Reply With Quote

Old   November 24, 2017, 06:07
Default
  #4
Member
 
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9
Alasir is on a distinguished road
This seems to have the disadvantage of jumping DIRECTLY to a high speed everywhere, thus making the simulation unsteady?
Alasir is offline   Reply With Quote

Old   November 24, 2017, 06:56
Default
  #5
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Sure, if your simulations becomes unstable at a certain velocity threshold, setting fvOptins/Ubar to this value will cause your solution to diverge. Otherwise there shouldn't be any problem.
RobertHB is offline   Reply With Quote

Old   November 24, 2017, 14:10
Default
  #6
Member
 
hulli graemer
Join Date: Oct 2014
Posts: 48
Rep Power: 12
hulli is on a distinguished road
try to play around with Ubar !!! otherwise you might have to adjust your schemes ....
hulli is offline   Reply With Quote

Old   November 27, 2017, 03:59
Default
  #7
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hi,

try to use the vectorSemiImplicitSource. In case of U, you introduce it as

injectionRateSuSp { U ((dpdx 0 0) 0); }

https://github.com/OpenFOAM/OpenFOAM...plicitSource.H
agustinvo is offline   Reply With Quote

Old   November 22, 2020, 09:34
Default
  #8
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
May help?

directionalPressureGradientExplicitSource
HPE is offline   Reply With Quote

Old   December 16, 2022, 05:34
Default
  #9
New Member
 
Haitham Osman
Join Date: Jan 2020
Posts: 6
Rep Power: 6
Haitham Osman CFD is on a distinguished road
Quote:
Originally Posted by HPE View Post
it was renamed to meanVelocityForce

https://github.com/OpenFOAM/OpenFOAM...898bec5fac74ad

kind regards
Haitham Osman CFD 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
outlet pressure Boundary settings -velocity streamline under ambient temp.conditions Vishnu_bharathi CFX 12 November 21, 2017 07:56
negative pressure gradient in cone-shaped pipe Pawel Zdunek Lounge 0 April 29, 2017 16:16
Pressure Outlet Guage pressure Mohsin FLUENT 36 April 29, 2016 18:16
vortex cause pressure gradient or pressure gradient induce vortex? fruitkiwi Main CFD Forum 4 June 12, 2012 02:12
how to get pressure and pressure gradient using UDF Honglin Fluent UDF and Scheme Programming 0 May 24, 2012 07:47


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