Step Function Velocity Inlet BC

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

 March 14, 2023, 05:38 Step Function Velocity Inlet BC #1 New Member   Eva Liu Join Date: Nov 2022 Posts: 9 Rep Power: 3 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?

 March 14, 2023, 05:43 #2 Senior Member   Gert-Jan Join Date: Oct 2012 Location: Europe Posts: 1,838 Rep Power: 27 you can limit the sine-function using a max-function: vel=max(sine-function, 0[m/s]

 March 14, 2023, 05:51 #3 New Member   Eva Liu Join Date: Nov 2022 Posts: 9 Rep Power: 3 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!

 March 14, 2023, 07:04 #4 Senior Member   Gert-Jan Join Date: Oct 2012 Location: Europe Posts: 1,838 Rep Power: 27 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.