CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Different results with custom 6dof solver in pitch with newmark scheme

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2022, 22:31
Default Different results with custom 6dof solver in pitch with newmark scheme
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19
quarkz is on a distinguished road
Hi,

I am trying to write my own custom 6dof (only in pitch) solver under the solidBodyMotionFunction class, using the newmark scheme. Reason is that my body undergoes large pitching rotation and if I use the org sixDoFRigidBodyMotion, the mesh deformation will be severe. However, if I run it under the solidBodyMotionFunction class, the whole body will pitch as a whole with no deformation.

I start off with modifing the rotatingmotion code since that's the nearest to what I want. So instead of prescribed rotation, the angle will be determined by the 6dof solver.

I followed the newmark scheme as given in the newmmark.C under the sixDoFRigidBodyMotion:

Code:
//newmark scheme
		angular_acc_z = accelerationRelaxation_*(moment_z/momentOfInertia_[2]); 
		
		angular_vel_z = angular_vel_z_old + accelerationDamping_*delta_time*(gamma_*angular_acc_z + (1. - gamma_)*angular_acc_z_old);
		
		//angle = angle_old + angular_vel_z_old*delta_time + accelerationDamping_*delta_time*delta_time*(beta_*angular_acc_z + (0.5 - beta_)*angular_acc_z_old);
		
		angle = angular_vel_z_old*delta_time + accelerationDamping_*delta_time*delta_time*(beta_*angular_acc_z + (0.5 - beta_)*angular_acc_z_old);
As I do not know how to obtain the total forces / moments from OF directly, I had to read in the data file from the postprocessing dir (if anyone knows how to call directly, pls let me know!).

I then compared my case with the wingMotion2D from the tutorial. I modified a bit to make it just simple pitch rotation in 1dof .

The results I obtained are similar for t = 0.1 and 0.2 but then the results start to diverge and for my case, the pitch angle keeps increasing. However, for the org tutorial, the pitch angle starts to reverse after ~ t = 0.4.

I wonder why. Is there anything which I missed out? Is using a custom 6dof solver under the solidBodyMotionFunction class sufficient to get the correct ans?

Hope someone can help or give some suggestions.

Thanks.
quarkz is offline   Reply With Quote

Old   May 1, 2022, 22:08
Default
  #2
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19
quarkz is on a distinguished road
Anyone can help?

I'm still struggling with the error. After t ~ 0.2s, the difference between my result and OF's gets bigger and bigger.

My understanding of 6dof, simplified for my problem is as follows:

For simple pitch only 1dof z axis

mz = external pitch force
izz = moment of inertia in z axis
center of rotation = center of mass
angular acceleration acc = mz/izz

v = u + acc*t, where v, u and t = new velocity, old velocity, delta time

new final displacement theta = theta_old + u*t + 0.5*acc*t^2

That's the simplest way. However, for better accuracy and stability, we can use the newmark scheme whereby:

acc = accelerationRelaxation_*(mz/izz);

v = u + accelerationDamping_*t*(gamma_*acc + (1. - gamma_)*acc_old);

theta = theta_old + u*t + accelerationDamping_*t^2*(beta_*acc + (0.5 - beta_)*acc_old);

Is there anything wrong with the above formulas?
quarkz is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Duplicate library entries when running a solver with custom library francescomarra OpenFOAM Programming & Development 3 May 17, 2022 09:37
foam-extend-4.1 release hjasak OpenFOAM Announcements from Other Sources 19 July 16, 2021 06:02
The different among the Pitch options MNMK CFX 2 November 12, 2020 04:27
Error Interpolating Results onto New Mesh nammeh CFX 1 March 26, 2019 13:08
fluent divergence for no reason sufjanst FLUENT 2 March 23, 2016 17:08


All times are GMT -4. The time now is 09:38.