CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   CEL Code for Sinusoidal Movement of Piston (https://www.cfd-online.com/Forums/cfx/147043-cel-code-sinusoidal-movement-piston.html)

gbrajtm January 12, 2015 06:48

CEL Code for Sinusoidal Movement of Piston
 
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

JuPa January 12, 2015 11:16

Your equation will have to be a function of time which means transient runs.

gbrajtm January 12, 2015 23:42

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

ghorrocks January 18, 2015 05:51

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.

gbrajtm January 18, 2015 22:22

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

ghorrocks January 18, 2015 22:29

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.

gbrajtm January 18, 2015 23:41

Yes its magnetorheological fluid damper.
Trying to get force velocity distribution.

ghorrocks January 19, 2015 16:19

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?

gbrajtm January 19, 2015 23:02

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.

ghorrocks January 20, 2015 01:03

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.

gbrajtm January 20, 2015 01:33

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

ghorrocks January 20, 2015 04:25

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.

gbrajtm January 20, 2015 04:30

Thank you very much for your time.

Kind Regards
Guru

gbrajtm February 23, 2015 07:08

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.

ghorrocks February 24, 2015 01:05

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.

gbrajtm March 18, 2015 23:34

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

ghorrocks March 19, 2015 01:29

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.

gbrajtm March 19, 2015 05:57

1 Attachment(s)
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

ghorrocks March 19, 2015 06:06

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.

gbrajtm March 19, 2015 06:12

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.?


All times are GMT -4. The time now is 07:37.