getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Imposing a rolling condition


From: Raphaël Meunier
Subject: Re: Imposing a rolling condition
Date: Fri, 15 Apr 2022 13:50:49 +0200

Dear Kostas,

 

Thank you for your response. As my intuition is not as sharp as yours, I might need a few explanations:


Thanks in advance,

Best regards

Raphaël

Le mer. 6 avr. 2022 à 23:14, Konstantinos Poulios <logari81@googlemail.com> a écrit :
Dear Raphaël,

Interesting question. Prescribing Fx is a bit strange condition. I haven't checked it, but I think something like this should work:

md.add_initialized_data("Fx", 10.)
md.add_initialized_data("Fy", 100.)

md.add_initialized_data("xc", 0.)
md.add_variable("yc", 1)
md.set_variable("yc", yc)
md.add_variable("phi",1)
md.set_variable("phi", 0.)
md.add_fem_variable("u", mfu)
md.add_filtered_fem_variable("mult", mfu, HoleZone)

md.add_macro("rot(x)", "[cos(x)-1,sin(x);-sin(x),cos(x)-1]")
md.add_macro("rot_der(x)", "[-sin(x),cos(x);-cos(x),-sin(x)]")

md.add_initialized_data("area", gf.asm_generic(mim, 0, "1", HoleZone)) # Calculate the area of the region
md.add_nonlinear_term(mim, "(u-rot(phi)*(X-[xc;yc])).mult", HoleZone)
md.add_linear_term(mim, "Fy/area*Test_yc", HoleZone)                                 # check if a minus sign is needed
md.add_linear_term(mim, "([Fx/area,0]*rot_der(phi))*(X-[xc;yc])*Test_phi", HoleZone) # check if a minus sign is needed

for time in [0,0.1,0.3,0.6,0.9]:
  md.set_variable("xc", speed*time)
  md.solve("noisy")

A bit based on intuition but you can certainly learn something from analyzing this suggestion. Let us discuss it further if you cannot get it to work and have more questions. Try to avoid expressions like "speed*time" and "alpha*time" in your expressions, they seem too specific to constant velocities, they make the code more difficult to read, and they will not help you to generalize the code later. Just solve for positions/angles directly if that's what you want.

FYI, the _expression_
(u-rot(phi)*(X-[xc;yc])).mult
will expand internally to something like
 (u-rot(phi)*(X-[xc;yc])).Test_mult
+Test_u.mult
-((rot_der(phi)*(X-[xc;yc])).mult)*Test_phi
-((rot(phi)*([0;1])).mult)*Test_yc

BR
Kostas


On Wed, Apr 6, 2022 at 4:54 PM Raphaël Meunier <raphael.meunier1@gmail.com> wrote:
Dear Getfem-Users,

I am trying to impose a rolling condition on a "tire". My work is directly inspired from the "Example of wheel in contact" tutorial. In this tutorial, one wants to prescribe the rim rigidity and the vertical force. From this, I just have to add a rolling condition. Specifically I want to find the rotation speed "alpha_rot" that enables me to impose some force Fx:

gwfl_rot='-lambda_D.Test_u + ([cos(alpha_rot*time),sin(alpha_rot*time);-sin(alpha_rot*time),cos(alpha_rot*time)]*(X-[0;y_c])-(X-[0;y_c])\
+ [speed*time;alpha_y] - u).Test_lambda_D +(lambda_D.[1;0] + Fx)*Test_alpha_rot + 1E-6*alpha_rot*Test_alpha_rot'
gwfl_y='(lambda_D.[0;1] + Fy)*Test_alpha_y + 1E-6*alpha_y*Test_alpha_y'
roll_gwfl=gwfl_y+gwfl_rot

idBrick = model.add_nonlinear_term(mim, roll_gwfl, HoleZone)

Where alpha_rot and alpha_y are the "parameters" I am trying to find. This works for up to ten timesteps but then it diverges... I tried to use two multipliers instead of one which leads to worse results.
Am I on the right track ? Is there a better way to achieve this ?

Thanks in advance,

Best regards,

Raphaël

reply via email to

[Prev in Thread] Current Thread [Next in Thread]