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: Tue, 19 Apr 2022 15:18:23 +0200

Dear Kostas,

Thank you again for the kind answer.

I tried the given script and it outputs an error message:
image.png
Which does not help me towards finding the right answer.
So, I tried to describe the settings of my experiment in the attached document. Please, feel free to ask if it is not clear enough.

Thank you in advance,

Best regards,

Raphaël Meunier

Le sam. 16 avr. 2022 à 19:09, Konstantinos Poulios <logari81@googlemail.com> a écrit :
Dear Raphaël,

It would help to have a description/sketch of the exact system you would like to model. But if I understood it correctly, you wanted to prescribe a constant force Fy in y-direction. If you introduce a degree of freedom yc for the vertical displacement, and you couple your wheel to yc, then you can easily apply a force on yc by multiplying the known force with the variation of yc.  Dividing with area is needed only if you add this term inside an integral over an area "area". This is because the integral of a constant is just as multiplying the constant with the area of the integration domain. You could achieve the same without an integral using the "model.add_explicit_rhs" function on the yc variable with rhs value equal to Fy (or -Fy, I do not remember exactly).

Regarding the term
"([Fx/area,0]*rot_der(phi))*(X-[xc;yc])*Test_phi"
I am not 100% sure about. This is the part based on intuition and some partial understanding of what you want to achieve. You can give it a try, but if it doesn't work please provide a proper sketch of your system so that I can help you with deriving this equilibrium condition correctly.

BR
Kostas



On Fri, Apr 15, 2022 at 1:51 PM Raphaël Meunier <raphael.meunier1@gmail.com> wrote:

Dear Kostas,

 

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

  • md.add_nonlinear_term(mim, "(u-rot(phi)*(X-[xc;yc])).mult", HoleZone) --> This order zero term seems pretty straightforward and much more readable than in my code
  • md.add_linear_term(mim, "Fy/area*Test_yc", HoleZone) --> No multiplier is involved in your formulation. Is this because we need to combine this term with the previous order 0 term -((rot(phi)*([0;1])).mult)*Test_yc (and check the sign) ?
  • md.add_linear_term(mim, "([Fx/area,0]*rot_der(phi))*(X-[xc;yc])*Test_phi", HoleZone) --> Could you explain how do you come up with this term ?
  • A more general question: Is it possible to formulate the whole condition as an order 0 term ?

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

Attachment: Tire_rolling.pptx
Description: MS-Powerpoint 2007 presentation


reply via email to

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