CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Step Function Velocity Inlet BC

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Gert-Jan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2023, 06:38
Default Step Function Velocity Inlet BC
  #1
New Member
 
Eva Liu
Join Date: Nov 2022
Posts: 9
Rep Power: 4
evaliu246 is on a distinguished road
I would like my inlet velocity BC to be oscillating with u(t)=0.022sin(10.965t) for half a period, then 0 for 2.9s, then back to u(t) for another half period, then back to 0 for 2.9s, repeating.

Is there a way to write a time-dependent CEL expression for this step function? Where depending of t the inlet velocity is either the sine function or 0?
evaliu246 is offline   Reply With Quote

Old   March 14, 2023, 06:43
Default
  #2
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28
Gert-Jan will become famous soon enough
you can limit the sine-function using a max-function:
vel=max(sine-function, 0[m/s]
Gert-Jan is offline   Reply With Quote

Old   March 14, 2023, 06:51
Default
  #3
New Member
 
Eva Liu
Join Date: Nov 2022
Posts: 9
Rep Power: 4
evaliu246 is on a distinguished road
Hi! Could you expand on what the max-function does? For my purposes how can I set the length of time I want to zero my inlet velocity for and the length of time I want the velocity to be the sine function? And have it be repeating?

Thanks!
evaliu246 is offline   Reply With Quote

Old   March 14, 2023, 08:04
Default
  #4
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28
Gert-Jan will become famous soon enough
How the flow fluctuates, is determined by your sine function. The max only takes the maximum of both expressions, i.e. your sine function and 0. You can add more functions to make it more sophisticated, that is up to you.

In my experience, it is best to first work it out in e.g. MS Excel. Then if it works there, it will work in CFX. Please remember that CFX-Pre, allows you to make a graph of your function. So you can check beforehand what you define and what will be used in the Solver.

However, if your flow fluctuates a lot making it too complicated using expression, it might be better to create a simple table of flow versus time in Excel (save as .csv-file), import in Pre, and use this. CFX will interpolate on intermediate time values.
Opaque likes this.
Gert-Jan is offline   Reply With Quote

Reply

Tags
cel expression, inlet bc, oscillating flow, step functions, velocity profiles


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
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 06:28
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 02:27
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 10:56
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 07:27
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 18:25.