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

CFX expression language

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By singer1812

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2014, 04:50
Question CFX expression language
  #1
New Member
 
Mahdi Mazloom
Join Date: Jul 2014
Location: Mashhad - Iran
Posts: 12
Rep Power: 11
mahdimazloom is on a distinguished road
How can I solve an ordinary differential equation using CFX expression language?
mahdimazloom is offline   Reply With Quote

Old   October 8, 2014, 06:23
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
You can't.
ghorrocks is offline   Reply With Quote

Old   October 8, 2014, 12:48
Default
  #3
New Member
 
Mahdi Mazloom
Join Date: Jul 2014
Location: Mashhad - Iran
Posts: 12
Rep Power: 11
mahdimazloom is on a distinguished road
Untitled.jpg

Menter, Florian, et al. "Overview of Fluid-structure coupling in ANSYS-CFX." 25th International Conference on Offshore Mechanics and Arctic Engineering. American Society of Mechanical Engineers, 2006.
mahdimazloom is offline   Reply With Quote

Old   October 8, 2014, 16:00
Default
  #4
Senior Member
 
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 20
singer1812 is on a distinguished road
The motion of the cylindar is prescribed by the forces on it.
Weight is one = m_cylinder*g
Spring is one = k*dy_cylinder
damper is one = c*v_cylinder
Fluid force = F_fluid

All of those values are variables in CFX. You can sum those up to F_sum

Your cylinder wall motion will be dicretization of F_sum=ma. The resulting displacement (this is relative to previous mesh) is used for mesh motion of (assuming motion in one direction only):

(F_sum*tstep/m+v_cylinder)*tstep

That equation can be used in CEL to move the wall.

I leave it to you to derive that.
mahdimazloom likes this.
singer1812 is offline   Reply With Quote

Old   October 8, 2014, 17:49
Thumbs up
  #5
New Member
 
Mahdi Mazloom
Join Date: Jul 2014
Location: Mashhad - Iran
Posts: 12
Rep Power: 11
mahdimazloom is on a distinguished road
Thanks Edmund. I think that's the answer
mahdimazloom is offline   Reply With Quote

Old   October 8, 2014, 17:51
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Nice work Edmund!

But in general you cannot solve an arbitrary ODE in CEL. It works in this specific case because it is using force as the variable and CFX has a lot of functions to calculate forces on bodies.
ghorrocks is offline   Reply With Quote

Old   October 8, 2014, 18:09
Default
  #7
New Member
 
Mahdi Mazloom
Join Date: Jul 2014
Location: Mashhad - Iran
Posts: 12
Rep Power: 11
mahdimazloom is on a distinguished road
I'v gotten my answer but is it possible to get access to the data from one or more steps before through CEL commands so one can solve the arbitrary ODE using finite difference method?
mahdimazloom is offline   Reply With Quote

Old   October 8, 2014, 18:15
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I thought my previous post was quite clear......

There is a messy way of accessing previous values. Do a search of the forum for "TRANS_LOOP".
ghorrocks is offline   Reply With Quote

Reply

Tags
cel, cfx, differential equation, ode


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
[swak4Foam] outputTime in Swak function immortality OpenFOAM Community Contributions 20 October 6, 2022 12:08
Expression in CFX anon_f CFX 10 August 11, 2014 04:32
logical expression for cfx interrupt control wjy-c CFX 0 November 29, 2013 04:30
Qustion about CFX expression bug Anna Tian CFX 4 May 12, 2013 19:29
cfx expression variables Manoj Kumar CFX 2 February 16, 2006 10:03


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