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

expression with variable domains

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2008, 15:34
Default expression with variable domains
  #1
jpshulf
Guest
 
Posts: n/a
I want to create an expression used to define a boundary condition.

The expression needs to be able to calculate the specified boundary condition at different time(s).

For example, the inlet velocity for one of my boundary conditions is defined as:

(3*t+5), for t<2

(11), for t>2

(-12t+14), for t>5

I tried messing aronud with the step function, but I don't believe this is the right approach. Any help would be greatly appreciated.
  Reply With Quote

Old   October 15, 2008, 20:33
Default Re: expression with variable domains
  #2
Glenn Horrocks
Guest
 
Posts: n/a
Hi,

Either use the step function or an interpolation function. There are no other options.

In CFX V12 you will be able to use an if function.

Glenn Horrocks
  Reply With Quote

Old   October 16, 2008, 01:50
Default Re: expression with variable domains
  #3
Georg
Guest
 
Posts: n/a
(3*t+5)*step(2-t)+11*step(t-2)*step(5-t)+(14-12*t)*step(t-5) Becouse Step is dimensionless function you should use t/1[s] insted of t (if t=time, of course). All parts of expression must have Velosity units. So, finally expression is ((3*t+5[s])*step(2-t/1[s])+11[s]*step(t/1[s]-2)*step(5-t/1[s])+(14[s]-12*t)*step(t/1[s]-5))*1[m/s^2] Not so camfortable as "if" "else" but it works. I hope it help you.

  Reply With Quote

Old   November 14, 2008, 17:46
Default Re: expression with variable domains
  #4
jpshulf
Guest
 
Posts: n/a
Thank you very very much!!!
  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
emag beta feature: charge density charlotte CFX 4 March 22, 2011 09:14
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 04:35
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 20:09


All times are GMT -4. The time now is 03:38.