Hinge rotated by Force field (e.g.: gravity)

Numerical methods and mathematical models of Elmer
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Hinge rotated by Force field (e.g.: gravity)

Post by kevinarden »

I was able to create the hing with another body in the circle. It behaved well except after 20 steps the contact stresses became very high and the elements started to have to much local distortion.

I used recombine on the geo to get quad elements and refined by splitting rwice then increased the order to 2.
hinge.geo
(1.87 KiB) Downloaded 38 times
hinge.sif
(2.57 KiB) Downloaded 37 times
zozitak
Posts: 7
Joined: 12 Aug 2022, 15:58
Antispam: Yes

Re: Hinge rotated by Force field (e.g.: gravity)

Post by zozitak »

Hi,

Thanks Peter for the fast response. I would gladly test it.

I think i did some progress, based on you explanation, Kevin's test, and on my own experience.
N-T Displacement can't handle a non-linear constraint, so do N-T Displacement Limit.
So i thought its time to test Cartesian Displacement, and Cartesian Displacment Limit for more complex functions.
I could make a smooth Sliding-Falling Hinge, and a not so smooth Rotating Hinge with simple Limits.

Not so smooth Rotating Hinge BC:

Code: Select all

Boundary Condition 1
  Name = "LeftCircle" 
  Target Boundaries(4) = 5 6 7 8
  !Blue
  Displacement 1 Upper Limit = Variable coordinate; Real MATC "1.5-tx(0)"
  !Red
  Displacement 1 Lower Limit = Variable coordinate; Real MATC "0.5-tx(0)"
  !Purple
  Displacement 2 Upper Limit = Variable coordinate; Real MATC "1.5-tx(1)"
  !Green
  Displacement 2 Lower Limit = Variable coordinate; Real MATC "0.5-tx(1)"
End

Image

Smooth Sliding-Falling Hinge

Code: Select all

Boundary Condition 1
  Name = "LeftCircle" 
  Target Boundaries(4) = 5 6 7 8
  Displacement 2 Lower Limit = Variable coordinate; Real MATC "if(tx(1)<1){(-sqrt(abs((tx(0)-1)^2-0.25))+1)-tx(1)}else{-1}"
End
I couldnt do a proper rotating hinge soo far, due to allways occuring numerical error. Any ways i will try my best.

Thanks Kevin for your Mortar BC - example, i will try to build it in.
It looks super cool!

Soo... The Rotating Hinge problem is not solved yet. If Anyone has and advice, remark or comment i greatly appriciate it.
Thank all you for your hard work.

Sincerly,
Zoli
Attachments
slidinghinge.zip
(42.82 KiB) Downloaded 34 times
Cart_D_limits.png
(79.79 KiB) Not downloaded yet
zozitak
Posts: 7
Joined: 12 Aug 2022, 15:58
Antispam: Yes

Re: Hinge rotated by Force field (e.g.: gravity)

Post by zozitak »

Hi,

One of my Friend made a simulation in ansys with rigidy body dynamics and he got 5.82 s as period time to the Hinge.
Ansys Hinge T = 5.82 s

I've got:
Timestep Sizes(1) = 0.001
Sliding Hinge T = 5020 ms
Squre Constrained Hinge T = 5815 ms
Circe Constrained Hinge T = 5821 ms

Experinces so far:
- At Squre your circle's middle point wiggles. Fine mesh and time resolution is required.
- At Circle. I had a hard time to make a Dirichlet condition for the top of the circle, because of numarical stability. Fine time resulution is required. ( Friction can be used. )
- At Mortar BC, i couldn't find currently an easy (non-UDF) way to update the NTRotation Matrix.
- At "Fill in" method, the problem is the coupling, because it must use NT Vectors for the coupling.
- I tried to Mesh Rotate with 0.0 and Cumulative Displacements = Logical True, because RigidMeshMapper's rotation works like intended, but i didn't incude the MeshUpdate Solver, and that might be my mistake at this approch. Other wise it convergates, and realtivly stable.

As a sidenote, i think the circle should be at least 128 segment or more, use Adaptive Mesh & Time. Saves a lot of hussle in the long run.

Thanks for your patient and kind support.

Sincerly,
Zoli
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Hinge rotated by Force field (e.g.: gravity)

Post by raback »

Hi,

I just committed (to "devel" branch) a strategy that might work in this case.

The user can give a function f(x,y,z) and the displacement will be added a constraint such that this equation should be made zero. For example, for circle at origin f(x)=x^2+y^2-R^2. Using the newton's method i.e. (df/dx)*(x'-x) + (df/dy)*(y'-y) = -f(x,y) where (x',y') is the new solution. This equation replaces an existing line in the matrix while the old row is added (or subtracted) to another component. The differentiation is now done numerically.

You can test this with test case "ElasticBeamHinged" and the attached two files.

If this works nicely the "hinge" could be coded as a special case so that the user do not need to give strange equations. Also the differentiation is then analytical making it more robust.

-Peter
Attachments
Curves.F90
F90 file that is used to define the two circles
(446 Bytes) Downloaded 39 times
test.sif
Modified sif file using the curve constraint
(2.75 KiB) Downloaded 37 times
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Hinge rotated by Force field (e.g.: gravity)

Post by raback »

Btw, also added keyword "Varname Hinge" (might change it still) that finds the circle/cylinder, fits it, and uses it to constraint the vector field "Varname" accordingly. So if your vector field is "Displacement" this would be "Displacement Hinge = Logical True". -Peter
zozitak
Posts: 7
Joined: 12 Aug 2022, 15:58
Antispam: Yes

Re: Hinge rotated by Force field (e.g.: gravity)

Post by zozitak »

Hello Peter,
Thank you very much for your work, i've had a glance on it.
My initial thoughts are:
- At "Variable Hinge" i need to read the source, for the circle finder algo.
- Displacemante Curve is promising.

It means a lot, that you reacted so quickly, and made something that potentionaly works.

Sincerly,
Zoli

P.S.: Lately I had a lot of work to do, but i will test as promised.
Post Reply