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

how to set the input as a variable?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2019, 13:48
Default how to set the input as a variable?
  #1
Member
 
Join Date: Feb 2019
Posts: 30
Rep Power: 7
IronLyon is on a distinguished road
I want to use the mass flow rate as the input, but not constant. Like in the first 1 s, it is 0.03 kg/s, then 0.02 kg/s for the next 3 s, then 0.01 kg/s for the last 1 s. The total time is 5 s. Is there a simple way to do that?
(As I can image, I will connect three modules and try to set the constant mass flow rate in each like 0.03, 0.02, 0.01 kg/s. Then use the result of the last module as the initial condition of the next phase. But it may not work.)
IronLyon is offline   Reply With Quote

Old   March 27, 2019, 15:03
Default
  #2
Senior Member
 
Join Date: Jun 2009
Posts: 1,815
Rep Power: 32
Opaque will become famous soon enough
You can write an expression using "step" function

step (arg) = 0 if arg < 0, 0.5 if arg = 0, 1 arg > 0

tfac = 1 [s]
massflow = Value1 * step( (t1 - t) / tfac) + Value2 * (step ((t2-t) / tfac) - step( (t1-t) / tfac) )

Recall you can plot the expression in CFX-Pre, Expressions panel. So you can try to see if the expression works as expected
Opaque is offline   Reply With Quote

Reply

Tags
input variable


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
[snappyHexMesh] determining displacement for added points CFDnewbie147 OpenFOAM Meshing & Mesh Conversion 1 October 22, 2013 09:53
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
Problem installing on 64bit with ver13 jonititan OpenFOAM Installation 5 May 12, 2006 18:42
Problem installing on 64bit with ver13 jonititan OpenFOAM Installation 0 April 28, 2006 05:45
Problems with installation jonititan OpenFOAM Installation 4 November 6, 2005 04:16


All times are GMT -4. The time now is 09:00.