# CFX expression language

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 8, 2014, 04:50 CFX expression language #1 New Member   Mahdi Mazloom Join Date: Jul 2014 Location: Mashhad - Iran Posts: 12 Rep Power: 10 How can I solve an ordinary differential equation using CFX expression language?

 October 8, 2014, 06:23 #2 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,365 Rep Power: 139 You can't.

 October 8, 2014, 12:48 #3 New Member   Mahdi Mazloom Join Date: Jul 2014 Location: Mashhad - Iran Posts: 12 Rep Power: 10 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.

 October 8, 2014, 16:00 #4 Senior Member   Edmund Singer P.E. Join Date: Aug 2010 Location: Minneapolis, MN Posts: 511 Rep Power: 19 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.

 October 8, 2014, 17:49 #5 New Member   Mahdi Mazloom Join Date: Jul 2014 Location: Mashhad - Iran Posts: 12 Rep Power: 10 Thanks Edmund. I think that's the answer

 October 8, 2014, 17:51 #6 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,365 Rep Power: 139 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.

 October 8, 2014, 18:09 #7 New Member   Mahdi Mazloom Join Date: Jul 2014 Location: Mashhad - Iran Posts: 12 Rep Power: 10 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?

 October 8, 2014, 18:15 #8 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,365 Rep Power: 139 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