CEL Code for Sinusoidal Movement of Piston

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 19, 2015, 06:17 #21 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 I have no idea what you are modelling so I cannot say whether it is correct. You also have not shown how you implemented anything. The equations you describe are the Bingham model, but as I said I would try to use the existing built in Bingham model if possible - but if you want to make yield stress a function of something I suspect you may have to define the model yourself.

 March 19, 2015, 06:29 #22 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 I can mail you my simulation if you provide the email id. I am trying simulate a magneto rheological fluid damper to study the performance by obtaining Force developed in the damper. The small thin gap is the annular gap of the piston where the fluid get magnetised under motion with certain velocity.

 March 19, 2015, 16:36 #23 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 I do not have time to go through your simulation in detail. The forum works best when you identify a specific problem you are having and post a question about that problem. Make sure you include enough information so we can understand what you are talking about and its context.

March 31, 2015, 05:50
#24
Member

Dr Gurubasavaraju
Join Date: Dec 2014
Location: Bengaluru India
Posts: 77
Rep Power: 10
Hi Glenn Horrocks,

Greetings,Hope you doing well.

I have added viscosity model as function of magnetic flux density using CEL, But i have not considered the piston location while calculating the Dynamic viscosity.
This the Expression i have used.

if(Shear Strain Rate >= 15[s^-1], (5000[kg m^-1 s^-2]/Shear Strain Rate)+0.11[kg m^-1 s^-1], 55[kg m^-1 s^-1])

I am finding difficulties in considering the Piston location as it moves up and down.

Do you have any solution for this.

Kind Regards
Guru
Attached Images
 Capture.jpg (25.1 KB, 30 views)

 March 31, 2015, 07:00 #25 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 I would expect convergence difficulties with a viscosity function like that. It has a big step in viscosity at SSR=15[s^-1]. Are you sure it is realistic? Looking back on this thread you state that you are defining the piston motion. So why can't you simply use the variable you defined for the piston motion as an input to this equation as well?

 March 31, 2015, 07:14 #26 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 yes, the value provided are not realistic. The values are different, for just your ference i have added. How to add the piston motion equation as the input to the Viscosity expression.

 March 31, 2015, 17:23 #27 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 You just include the x, y or z displacement of the piston in the CEL expression - it is not that hard. You just need to be careful about getting the units right.

 April 1, 2015, 02:30 #28 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Sorry for troubling you. I didn't get how to add. My displacement expression for Piston motion in X direction is: 0.0425[m]*sin(t/1 [s]) And dynamic viscosity is if(Shear Strain Rate >= 15[s^-1], (5000[kg m^-1 s^-2]/Shear Strain Rate)+0.11[kg m^-1 s^-1], 55[kg m^-1 s^-1])

 April 1, 2015, 07:03 #29 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 How about this: PistonX = 0.0425[m]*sin(t/1 [s]) Tolerance = 0.1 [m] CloseToPiston = if(abs(x-PistonX)= 15[s^-1], (5000[kg m^-1 s^-2]/Shear Strain Rate)+0.11[kg m^-1 s^-1]+CloseToPiston*10[Pa s], 55[kg m^-1 s^-1] + CloseToPiston*10[Pa s]) You might need to fix the units up but hopefully you get the idea. This function adds 10 Pa.s to the viscosity when you are within 0.1 metres of the current piston location.

 April 1, 2015, 07:46 #30 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Thank you very much i will simulate and let you. Thanks

April 11, 2015, 04:39
#31
Member

Dr Gurubasavaraju
Join Date: Dec 2014
Location: Bengaluru India
Posts: 77
Rep Power: 10
Hi,
Glenn Horrocks,
The expression below are used in the simulation.

St = 10000*tanh(Shear Strain Rate/0.001[s^-1])
pistonx = 0.0425[m]*cos(1.33*t/1 [s])
Vel = 0.06[m/s]*sin(1.33*t/1 [s])
Tolerance = 0.01 [m]
CloseToPiston = if(abs(x-PistonX)<Tolerance,1,0)
Visco = if(Shear Strain Rate >= 0.001[s^-1], (St[kg m^-1 s^-2]/Shear Strain Rate)+0.11[kg m^-1 s^-1]+CloseToPiston*10[Pa s], 100[kg m^-1 s^-1] + CloseToPiston*10[Pa s])

I am getting error(shows as Overflow and negative volume element) in solver if i use total time 0.5s and time step 0.01s. if i change it 0.1s and 0.005 time steps, simulation goes fine. any suggestions on this.

Please find the attachment for details of my simulation

Second is can you please elaborate. CloseToPiston = if(abs(x-PistonX)<Tolerance,1,0)

Attached Images
 Capture.jpg (24.3 KB, 22 views)

 April 12, 2015, 07:52 #32 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 Fix the negative volume element issue first. It might the cause of the overflow error as well. Rerun the simulation generating transient results files on every time step, or at least the time steps just before it crashes. Make sure you include the mesh in the transient results files. Then use the post processor to look at the mesh and work out where the mesh is turning in side out. Then you know what you need to fix.

 April 20, 2015, 07:09 #33 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 If want to consider the piston location along with other two co-ordinate, what changes i have to make to this expression. CloseToPiston = if(abs(x-PistonX)

 April 20, 2015, 07:40 #34 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 Isn't that high school level maths? - http://www.purplemath.com/modules/distform.htm

 April 23, 2015, 02:16 #35 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Yes , I know the expressions, But didn't know how to make it compatible with ANSYS CEL. My intention is the thin region should behave like Non newtonian as per the expression given, but rest region is should be newtonian. Presently i have used Inside()@location for specifying the region. if(Shear Strain Rate >= 0.001[s^-1], (40000[kg m^-1 s^-2]/Shear Strain Rate)+0.11[kg m^-1 s^-1], 55[kg m^-1 s^-1])*inside()@piston is this correct? But the simulation gives error for all turbulence models and runs without error for Laminar model.

 April 23, 2015, 05:53 #36 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 Your function returns 0 if you are outside the region. You cannot set the viscosity to be zero.

 April 23, 2015, 06:13 #37 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 thanks, now I got it, so results are as not expected. Closetopiston expression used also not service the goal. is there any other method? where i can write expression depending on time in the same domain, while moving the piston in the domain, with specified CCL expression whether node is active region or not.

 April 23, 2015, 07:18 #38 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 To make your latest CEL expression work you simply need to make it return a non-zero value when outside the region. A simple if statement will do that: a = if(Shear Strain Rate >= 0.001[s^-1], (40000[kg m^-1 s^-2]/Shear Strain Rate)+0.11[kg m^-1 s^-1], 55[kg m^-1 s^-1])*inside()@piston viscosity = if(inside@piston == 1,a, 1 [kg m^-1 s^-1]) Or something like that.

 May 6, 2015, 04:00 #39 Member   Dr Gurubasavaraju Join Date: Dec 2014 Location: Bengaluru India Posts: 77 Rep Power: 10 Hi Glenn Horrocks, This equations works fine, even i am getting some results. Then i noticed that the @piston is 2D location as shown in the fig. But i am not sure whether " Inside" function take only the surface into account or the region below it along. I was trying to add the 3D region as marked in the red. but it does not happening. There is no option for getting cells location which are in the thin region.

 May 6, 2015, 19:14 #40 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,327 Rep Power: 138 For a 3D region you need to define it in your mesh. So you will need to set this up in the meshing software.

 Thread Tools Search this Thread Search this Thread: Advanced Search Display Modes Linear Mode

 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 OffTrackbacks are Off Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Whitworth ANSYS 5 March 3, 2015 23:50 helloworld922 Autodesk Simulation CFD 1 September 9, 2012 22:54 Juan Carlos GARCIA SALAS Main CFD Forum 39 November 1, 1999 14:34 Heinz Wilkening Main CFD Forum 38 March 5, 1999 11:44 Lans Main CFD Forum 13 October 27, 1998 10:20

All times are GMT -4. The time now is 20:00.

 Contact Us - CFD Online - Privacy Statement - Top