|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Mahdi Mazloom
Join Date: Jul 2014
Location: Mashhad - Iran
Posts: 12
Rep Power: 12 ![]() |
How can I solve an ordinary differential equation using CFX expression language?
|
|
![]() |
![]() |
![]() |
![]() |
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 ![]() ![]() ![]() ![]() |
You can't.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Mahdi Mazloom
Join Date: Jul 2014
Location: Mashhad - Iran
Posts: 12
Rep Power: 12 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Edmund Singer P.E.
Join Date: Aug 2010
Location: Minneapolis, MN
Posts: 511
Rep Power: 21 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Mahdi Mazloom
Join Date: Jul 2014
Location: Mashhad - Iran
Posts: 12
Rep Power: 12 ![]() |
Thanks Edmund. I think that's the answer
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 ![]() ![]() ![]() ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Mahdi Mazloom
Join Date: Jul 2014
Location: Mashhad - Iran
Posts: 12
Rep Power: 12 ![]() |
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?
|
|
![]() |
![]() |
![]() |
![]() |
#8 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 ![]() ![]() ![]() ![]() |
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". |
|
![]() |
![]() |
![]() |
Tags |
cel, cfx, differential equation, ode |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] outputTime in Swak function | immortality | OpenFOAM Community Contributions | 20 | October 6, 2022 13:08 |
Expression in CFX | anon_f | CFX | 10 | August 11, 2014 05:32 |
logical expression for cfx interrupt control | wjy-c | CFX | 0 | November 29, 2013 05:30 |
Qustion about CFX expression bug | Anna Tian | CFX | 4 | May 12, 2013 20:29 |
cfx expression variables | Manoj Kumar | CFX | 2 | February 16, 2006 11:03 |