|
[Sponsors] |
simple one dof oscillator without fluid force gives increasing oscillation amplitude |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 17 ![]() |
Hello all,
I set up a simple test case to test the 6dof solver in OF. The OF version is OF1912 It is a circular cylinder in a fluid at rest attached at a linear spring without damper. The density and viscosity of the fluid is set zero in order that no fluid force acts on the cylinder. After releasing the cylinder from an initial position where the spring is at tension, the amplitude of the oscillations increase instead to keep at a constant value like expected. The increase of the amplitude is smaller for smaller time steps but even for a very small time step of dt = 0.00005 the amplitude increases of 5% after ten cycles. Any clue if I messed up something. Has anyone similar experiences? I attached the case files with an Allrun script. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 17 ![]() |
I just used the symplectic solver to update the position of the mass connected to the spring and I got the analytical solution for all time step sized used above (see plot).
Hm interesting. Have to check the implementation of the Newmark method. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 17 ![]() |
Following wikipedia https://en.wikipedia.org/wiki/Newmark-beta_method the Newmark method is as follows (without external forces):
![]() ![]() ![]() It is an implicit method. This means that we have three equations for the three unknowns: the position ![]() ![]() ![]() I checked the code of the Newmark method implemented in openfoam: Code:
void Foam::sixDoFSolvers::Newmark::solve ( bool firstIter, const vector& fGlobal, const vector& tauGlobal, scalar deltaT, scalar deltaT0 ) { // Update the linear acceleration and torque updateAcceleration(fGlobal, tauGlobal); // Correct linear velocity v() = tConstraints() & (v0() + aDamp()*deltaT*(gamma_*a() + (1 - gamma_)*a0())); // Correct angular momentum pi() = rConstraints() & (pi0() + aDamp()*deltaT*(gamma_*tau() + (1 - gamma_)*tau0())); // Correct position centreOfRotation() = centreOfRotation0() + ( tConstraints() & ( deltaT*v0() + aDamp()*sqr(deltaT)*(beta_*a() + (0.5 - beta_)*a0()) ) ); // Correct orientation vector piDeltaT = rConstraints() & ( deltaT*pi0() + aDamp()*sqr(deltaT)*(beta_*tau() + (0.5 - beta_)*tau0()) ); Tuple2<tensor, vector> Qpi = rotate(Q0(), piDeltaT, 1); Q() = Qpi.first(); } ![]() ![]() ![]() So maybe the calculation of the acceleration at the new time step using old velocity and position values lead to divergence. Or maybe I'm wrong. Are there any comments from the community? Best Michael |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 17 ![]() |
Just wanted to say that I summarized some results in this small tutorial:
https://wiki.openfoam.com/1Dof_sprin...ichael_Alletto |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Chennakesava Kadapa
Join Date: Apr 2023
Posts: 2
Rep Power: 0 ![]() |
The implementation of the Newmark scheme in Openfoam is incorrect. The implementation is explicit; however, it is not stable for gamma=0.5 and beta=0.25.
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 03:32 |
Force can not converge | colopolo | CFX | 13 | October 4, 2011 22:03 |
Fluid Force _output | jiko | FLOW-3D | 2 | September 29, 2010 12:11 |
air bubble is disappear increasing time using vof | xujjun | CFX | 9 | June 9, 2009 07:59 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 09:11 |