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

accelerationDamping in DynamicMeshDict

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2018, 05:14
Question accelerationDamping in DynamicMeshDict
  #1
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 8
insane is on a distinguished road
Dear all,
I'm recently trying to deal with a body in waves, but the result shows that the linear and Angular velocity are particularly high, so I want to use accelerationDaming and accelerationrelaxation to solve this problem,but I am not sure the accuracy of the result if I reduce these parameters such as 0.001 or even smaller .
I would be appreciated if anyone could give me any advice.
Thanks in advance.
insane is offline   Reply With Quote

Old   October 4, 2018, 10:01
Default
  #2
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Search in the www.openfoamwiki.net for your keyword. There is exciting and helpful information.
bigphil likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 4, 2018, 23:44
Default
  #3
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 8
insane is on a distinguished road
Dear Tobias,
Thank you for your reply.
But I have already read DynamicMeshDict and Parameter Definitions, What I have learned from that is the following lines :
Be careful with this accelerationRelaxation. Too low of a value will mean that the Body does not respond to the fluid forces correctly.
What confused me was that I haven't seen a similar description of the accelerationDamping, so I want to change this value to solve my problem(I'm not sure about its accuracy, that's why I posted this thread).
I have just learned CFD for two months, my question may seem too simple, I'm sorry about that.
insane is offline   Reply With Quote

Old   October 5, 2018, 01:58
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,
it´s always a matter of knowledge. To know what the keyword and respectively the value does, you should check the source code and analyze it. I did some tests with 6DoF concerning flow-induced-rotations, but I don´t know if my set-up was correct (no validation was done). Thus, I cannot give you detailed feedback, sorry for that.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   October 5, 2018, 03:16
Default
  #5
New Member
 
Ian
Join Date: Aug 2018
Posts: 15
Rep Power: 8
insane is on a distinguished road
thank you any way
insane is offline   Reply With Quote

Old   October 5, 2018, 04:08
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Checked it and the accelerationDamping and accelerationRelaxation factors are one if not specified. However, it will influence the system as follow:

https://cpp.openfoam.org/v6/sixDoFRi...8C_source.html
Code:
 void Foam::sixDoFRigidBodyMotion::updateAcceleration
  270 (
  271     const vector& fGlobal,
  272     const vector& tauGlobal
  273 )
  274 {
  275     static bool first = true;
  276 
  277     // Save the previous iteration accelerations for relaxation
  278     vector aPrevIter = a();
  279     vector tauPrevIter = tau();
  280 
  281     // Calculate new accelerations
  282     a() = fGlobal/mass_;
  283     tau() = (Q().T() & tauGlobal);
  284     applyRestraints();
  285 
  286     // Relax accelerations on all but first iteration
  287     if (!first)
  288     {
  289         a() = aRelax_*a() + (1 - aRelax_)*aPrevIter;
  290         tau() = aRelax_*tau() + (1 - aRelax_)*tauPrevIter;
  291     }
  292     else
  293     {
  294         first = false;
  295     }
  296 }
As one can see, it is a common relaxation method (as we do it for field relaxation).

One remark. I do not get the point of the if/else loop. Actually, I would expect that the last iteration in a PIMPLE loop should be without relaxation (so vice versa).
Maybe there is a bug, or I don´t get the point correctly. However, doing a correct numerical analysis should give you the same velocity (relaxation is for stability).
Maybe you are searching for a damping rather than relaxation or !!! your solution is not stable and thus, you get higher values.

Please see point 5.2 here https://openfoamwiki.net/index.php/P...onSolverFvMesh

PS: A useful discussion might be here (a bit old but I guess it is still interesting to read through): https://bugs.openfoam.org/view.php?id=1675
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 17, 2020, 13:35
Default
  #7
New Member
 
Michiel Bots
Join Date: Jan 2020
Posts: 9
Rep Power: 6
mbots is on a distinguished road
Dear Tobias,
Thank you very much for the explanations above.
Do you happen to know how the acceleration damping aDamp is used? So far, I've only been able to find how the acceleration relaxation factor is used.

In the sixDoFSolverl.H file I've found the following lines of code, but this doesn't seem to use the acceleration damping value aDamp.

Quote:
//- Update and relax accelerations from the force and torque
inline void Foam::sixDoFSolver::updateAcceleration
(
const vector& fGlobal,
const vector& tauGlobal
)
{
body_.updateAcceleration(fGlobal, tauGlobal);
}
Thanks for your time!

Michiel
mbots is offline   Reply With Quote

Old   July 17, 2020, 14:07
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Dear Michiel (I would be interested in the pronounciation),

questions like yours can be easily checked using grep. E.g., go to the source folder and grep it:
Code:
grep -rni -e 'aDamp_"
I get the following results (you might get different, if you are not using the OpenFOAM Foundation version in the DEV line of commit xyz):
Code:
sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C:94:    aDamp_(1.0),
sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C:132:    aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)),
sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C:179:    aDamp_(sDoFRBM.aDamp_),
sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.H:111:        scalar aDamp_;
sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C:36:    aDamp_ = dict.lookupOrDefault<scalar>("accelerationDamping", 1.0);
sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C:58:    writeEntry(os, "accelerationDamping", aDamp_);
sixDoFSolvers/sixDoFSolver/sixDoFSolverI.H:95:    return body_.aDamp_;
Hence, we can check out the source files and the lines and can get the point where it is used. However, in the sixDoFRigidBodyMotion.C file we only can find the initialization of the quantity. In the ...IO.C file it is similar. Finally, we see in the sixDoFSolverI.H file (the last character »I« stands for inline-functions), that this coefficient is returned by the function:
Code:
inline Foam::scalar Foam::sixDoFSolver::aDamp() const                           
{                                                                               
    return body_.aDamp_;                                                        
}
Now we can use grep to find the execution lines of this function in the code.
Code:
inline Foam::scalar Foam::sixDoFSolver::aDamp() const                           
{                                                                               
    return body_.aDamp_;                                                        
}
Here you can see that it is used in the CrankNicolson, sympletic and Newmark classes. Out of the box, I am not sure how to specify them and what these classes do. But it seems to be something with time-integration

Hope this helps.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 19, 2020, 17:34
Default
  #9
New Member
 
Michiel Bots
Join Date: Jan 2020
Posts: 9
Rep Power: 6
mbots is on a distinguished road
Thank you very much Tobias, it's definitely helpful.

My name is Dutch, and we pronounce the '-ch' the same as '-g', which is the sound that most foreigners only know from when there's a fly in their throat ;-)
mbots is offline   Reply With Quote

Old   April 27, 2023, 05:10
Default
  #10
New Member
 
Arun Kumar
Join Date: Sep 2019
Location: Dundee, Scotland
Posts: 15
Rep Power: 7
AR91 is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Dear Michiel (I would be interested in the pronounciation),

questions like yours can be easily checked using grep. E.g., go to the source folder and grep it:
Code:
grep -rni -e 'aDamp_"
I get the following results (you might get different, if you are not using the OpenFOAM Foundation version in the DEV line of commit xyz):
Code:
sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C:94:    aDamp_(1.0),
sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C:132:    aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)),
sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.C:179:    aDamp_(sDoFRBM.aDamp_),
sixDoFRigidBodyMotion/sixDoFRigidBodyMotion.H:111:        scalar aDamp_;
sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C:36:    aDamp_ = dict.lookupOrDefault<scalar>("accelerationDamping", 1.0);
sixDoFRigidBodyMotion/sixDoFRigidBodyMotionIO.C:58:    writeEntry(os, "accelerationDamping", aDamp_);
sixDoFSolvers/sixDoFSolver/sixDoFSolverI.H:95:    return body_.aDamp_;
Hence, we can check out the source files and the lines and can get the point where it is used. However, in the sixDoFRigidBodyMotion.C file we only can find the initialization of the quantity. In the ...IO.C file it is similar. Finally, we see in the sixDoFSolverI.H file (the last character »I« stands for inline-functions), that this coefficient is returned by the function:
Code:
inline Foam::scalar Foam::sixDoFSolver::aDamp() const                           
{                                                                               
    return body_.aDamp_;                                                        
}
Now we can use grep to find the execution lines of this function in the code.
Code:
inline Foam::scalar Foam::sixDoFSolver::aDamp() const                           
{                                                                               
    return body_.aDamp_;                                                        
}
Here you can see that it is used in the CrankNicolson, sympletic and Newmark classes. Out of the box, I am not sure how to specify them and what these classes do. But it seems to be something with time-integration

Hope this helps.
Hello,
Thank you for having this discussion on the thread. I have a query about accelerationRelaxation in the floatingObject case.

I have changed the floatingObject tutorial from 3D to 2D, and moved the box up to mid tank height such that its weight is equal to the weight of fluid displaced (checked fluid density and made sure the cells are clearly demarcated between the fluids and the box). There are no restraints or constraints on the box and the water level is still and flat so there's so movement in the fluid.

1. Is it impossible to get a hydrostatically stable box in interDyMFoam? Because the box topples over eventually (after 3 seconds of computations) no matter what.
2. Is the use of accelerationRelxation unavoidable? The relaxation factor value in the tutorial is 0.7 and if I take this out (defaulting its value to 1), then the computations crash immediately within the first few time steps.

I have been stuck with trying to get hydrostatic stability for several weeks and progress on my project is severely affected. Any assistance would be truly appreciated.
Regards,
Arun.
AR91 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
Including run time as variable in dynamicMeshDict RKyle OpenFOAM Pre-Processing 4 March 26, 2023 01:39
restriction coefficients in dynamicMeshDict Jiahui OpenFOAM 2 June 19, 2018 11:37
Difference between dynamicMeshDict - dynamicMeshDict.sixDoF Marc Batlle OpenFOAM Pre-Processing 1 August 16, 2017 12:50
I can't understand the moving function of "libfvMotionSolver.so" in dynamicMeshDict Jung hoo OpenFOAM Programming & Development 0 July 13, 2016 04:36
two (rival) dynamicMeshDict & objectRegistry (??) codder OpenFOAM Running, Solving & CFD 1 January 27, 2014 23:16


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