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

Using slef define function to describe the inlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2019, 09:03
Default Using slef define function to describe the inlet
  #1
Member
 
Join Date: Feb 2019
Posts: 30
Rep Power: 7
IronLyon is on a distinguished road
Hello, I have a question about the define of Piecewise function as inlet in CFX. Someone can help me?


The transisent process is 5 s in total, I would like to using two different fit linear to define the inlet, one from 0 to 1.5 s, the other from 1.5 s to 5 s.


The functions are show below:
func 1.PNGfunc 2.PNG


Both of the functions are quadratic function.


How can I achieve it in CFX?
IronLyon is offline   Reply With Quote

Old   May 10, 2019, 10:27
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
Say you have f1, and f2 to be switched at t = t_sw

F = step((t_sw - t) / 1 [s]) * f1 + (1 - step((t_sw - t) / 1 [s]) * f2

check it behaves correctly at t_sw
Opaque is offline   Reply With Quote

Old   May 13, 2019, 03:44
Default
  #3
Member
 
Join Date: Feb 2019
Posts: 30
Rep Power: 7
IronLyon is on a distinguished road
Quote:
Originally Posted by Opaque View Post
Say you have f1, and f2 to be switched at t = t_sw

F = step((t_sw - t) / 1 [s]) * f1 + (1 - step((t_sw - t) / 1 [s]) * f2

check it behaves correctly at t_sw

Thank you! I have checked, it did works! And it can be also written as

F = step((t_sw - t) / 1 [s]) * f1 + step((t - t_sw) / 1 [s]) * f2.


Before I thought ''step'' is only used to describe the step function, now has new idea how it works. Suppi!
IronLyon is offline   Reply With Quote

Reply

Tags
define inlet, piecewise function, quadratic function, variable inlet


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
Laminar Kinetic Energy Model (Walters 2008) logoswort Fluent UDF and Scheme Programming 2 May 19, 2017 19:41
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 10:20
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 06:27
How define porous media as INLET? Harry Qiu FLUENT 2 April 13, 2001 16:34


All times are GMT -4. The time now is 08:42.