# CEL Code for Sinusoidal Movement of Piston

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

 January 12, 2015, 06:48 CEL Code for Sinusoidal Movement of Piston #1 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Hi, How to write CEL expression for Sinusoidal movement of piston in cylinder. How make different fluid regions in the global domain using CCL expressions. Kind Regard's Guru

 January 12, 2015, 11:16 #2 Senior Member     Mr CFD Join Date: Jun 2012 Location: Britain Posts: 361 Rep Power: 14 Your equation will have to be a function of time which means transient runs.

 January 12, 2015, 23:42 #3 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Thanks for your time, I know the equation for motion, ie Stroke S=S(max) COS (wt) Velocity U=U(max) SIN(wt) But i dont know how to implement it in CFX, Presently i am using Periodic motion option in rigid body. Could please help in this, Kind regard's Guru

 January 18, 2015, 05:51 #4 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,483 Rep Power: 140 You do not need rigid bodies to model a piston in a cylinder, just moving mesh. Also: If you are modelling a standard conrod driven piston (like an IC engine) then your equation of motion is wrong. The conrod introduces higher order terms into the motion which are significant in almost all cases.

 January 18, 2015, 22:22 #5 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Hi Glenn, Thanks for ur respond, I am simulating a MR damper, where the fluid near piston is non newtonian and rest region is newtonian fluid. The piston moves similar to shock absorber. I am facing problem in specifying the Fluid domain and piston motion. Please let me know of you have any suggestions. Kind regards Guru

 January 18, 2015, 22:29 #6 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,483 Rep Power: 140 Please do not use jargon. What is a MR damper? .... I just looked it up on google, is it a Magnetorheological damper? What are you trying to learn with this simulation? What are you trying to do? The type of model you do depends on what you are trying to achieve.

 January 18, 2015, 23:41 #7 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Yes its magnetorheological fluid damper. Trying to get force velocity distribution.

 January 19, 2015, 16:19 #8 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,483 Rep Power: 140 What do you mean by force velocity distribution? How does that fit in with your original request of how to put a sinusoidal motion on the piston?

 January 19, 2015, 23:02 #9 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 I wanted to study the force developed(pressure) at different velocity of the piston, when it is under reciprocatory action. The viscosity of fluid going to change near the piston, when it is exposed to magnetic field.

 January 20, 2015, 01:03 #10 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,483 Rep Power: 140 OK, thanks. In that case you definitely do not want to use the rigid body solver. Use mesh motion and put your equation of motion on the moving piston. Put unspecified motion on the side boundaries and stationary boundaries on the top face. This will be the simplest way to implement this simulation.

 January 20, 2015, 01:33 #11 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Presently i am using periodic displacement in the mesh motion. But if i wanted use the expression where exactly i supposed to put it. Kind regards Guru

 January 20, 2015, 04:25 #12 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,483 Rep Power: 140 There used to be example tutorials of pure mesh motion but they don't seem to be in V15. Have a look on the ANSYS community website, there might be some examples there.

 January 20, 2015, 04:30 #13 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Thank you very much for your time. Kind Regards Guru

 February 23, 2015, 07:08 #14 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Hi Glenn Horrocks, Hope you doing well. I need one more help, my problem statement is below. I have magnetorheological damper, Where the area near to the piston (piston has holes to pass fluid) will become non newtonian, when it gets magnetised fluid either side of it will be remain newtonian. I wanted to move the piston with certain stroke and velocity under the said condition. I don't know how to write an CCL command language for the fluid property. could you please help.

 February 24, 2015, 01:05 #15 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,483 Rep Power: 140 The CEL expressions to do material properties are similar to any other expressions (for example your piston motion equations). Have a look in the tutorials for examples of CEL expressions.

 March 18, 2015, 23:34 #16 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Hi Glenn, I got the expression where the Bingham model is defined in terms of shear rate. How can i incorporate it into fix? Equations are μ= τ_y/γ + μp γ ≥ 15 μ = μs γ < 15 μs ≥ 500 * μp

 March 19, 2015, 01:29 #17 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,483 Rep Power: 140 The Bingham non-Newtonian model is already a built in model in CFX. There is no need to write the equations to define it. Just use the existing model. The built in model also has the advantage that it is properly integrated into the solver, so derivatives are correctly calculated for linearisation to assist convergence and error checking is done. You won't get this if you define your own viscosity function.

March 19, 2015, 05:57
#18
Member

Dr Gurubasavaraju
Join Date: Dec 2014
Location: Bengaluru India
Posts: 77
Rep Power: 10
In same computational domain i have two types of fluid properties. In annular gap its not newtonian fluid due to viscosity and in rest other region it is newtonian. so viscosity is defined in terms of yield stress(function of magnetic flux density).
Hence wherever the shear rate(exceeds the specified value) changes that is non newtonian region and rest will be newtonian, this is according to the expression i have mentioned earlier.

Please have look on the model, which i have attached.

Regard's
Guru
Attached Images
 Capture.PNG (42.6 KB, 44 views)

 March 19, 2015, 06:06 #19 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,483 Rep Power: 140 The function you describe is a simple CEL expression. A couple of if functions and some other basic operators should do it. Have a look in the CFX reference guide for the available functions and CEL syntax. The tutorials give examples of several CEL expressions. The model you propose sounds complex - a non-Newtonian fluid linked to a magnetic flux density field. If you are going to do a simulation as complex as this you will need to be able to do basic stuff like CEL expressions yourself.

 March 19, 2015, 06:12 #20 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Yes its little complex, I have obtained the yield stress value from the magnetic flux density. Is the way i am doing is correct? may i know what you think.?