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

How to have spatially varying inlet velocity profile for a multiphase flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2017, 08:27
Default How to have spatially varying inlet velocity profile for a multiphase flow
  #1
New Member
 
Ørjan Kvamme
Join Date: Mar 2017
Posts: 3
Rep Power: 9
orjankv is on a distinguished road
Hi folks,

Looking for input on how to set a spatially varying inlet velocity for example linear:

U(y) = S*y

The flow is multiphase (air, water), where the water part is the one that needs to have the spatially varying velocity.

Preferably there is also a way to change the initial velocity in the water part as well, maybe by using the setFields utility and topoSet?
orjankv is offline   Reply With Quote

Old   October 4, 2017, 14:44
Default
  #2
New Member
 
Thomas Evans
Join Date: Dec 2015
Posts: 21
Rep Power: 10
windscion is on a distinguished road
The setFields utility can set cell values and/or face values. What you need here is face values on the inflow patch. This fragment from setFieldsDict should give you the idea.

defaultFieldValues
(
volVectorFieldValue U (0.4 0 0)
);


regions
(
boxToFace
{
box (-1 -1 -30) (1 1201 -27.5);

fieldValues
(
volVectorFieldValue U (0.267863 0 0)
);
}
boxToFace
{
box (-1 -1 -27.5) (1 1201 -25);

fieldValues
(
volVectorFieldValue U (0.313519 0 0)
);
}
boxToFace
{
box (-1 -1 -25) (1 1201 -22.5);

fieldValues
(
volVectorFieldValue U (0.334759 0 0)
);
}
// ... more boxes
)

Oops, I missed the part where you said ICs as well. Same idea, but use boxToCell with boxes that cover the required volumes. If making the variation smooth is crucial, you probably want to use funkySetFields.
windscion is offline   Reply With Quote

Old   October 5, 2017, 05:42
Default
  #3
New Member
 
Ørjan Kvamme
Join Date: Mar 2017
Posts: 3
Rep Power: 9
orjankv is on a distinguished road
Smooth variation is ideal, so I should try funkySetFields. Do you need to compile something to get funkySetFields to get it. It just says command not found when I try to execute.

I am currently running OpenFoam 5.0.
orjankv is offline   Reply With Quote

Old   October 5, 2017, 09:16
Default
  #4
New Member
 
Thomas Evans
Join Date: Dec 2015
Posts: 21
Rep Power: 10
windscion is on a distinguished road
funkySetFields is part of swak4foam -- https://openfoamwiki.net/index.php/Contrib/swak4Foam
windscion 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
Issues on the simulation of high-speed compressible flow within turbomachinery dowlee OpenFOAM Running, Solving & CFD 11 August 6, 2021 06:40
UDF parbolic inlet velocity profile for 3D Ractangular channel flow. srv537 Fluent UDF and Scheme Programming 4 August 10, 2016 09:25
3D Velocity profile for turbulent flow Kirill Fluent UDF and Scheme Programming 3 July 17, 2014 08:42
How to define a fixed velocity for a given mass flow rate on inlet mqasimali FLUENT 2 April 12, 2013 17:24
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13


All times are GMT -4. The time now is 15:46.