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

FSI with pimpleDyMFoam: Loosely or Closely coupled?

Register Blogs Community New Posts Updated Threads Search

Like Tree19Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 2, 2019, 09:09
Default correctPhi
  #21
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Hi Bloerb,

It seems that some of my simulations still diverge after a very long simulation time, say t > 500. I wanted to try the following:

- increase outerCorrectors and remove Pimple residuals (to force all the outerCorrectors)
- experiment with implicit solver
- use a higher acceleration relaxation
- use a fixed time-step instead of a adjustable time-step.

Would you know any other possibilities?

And, what does the correctPhi function do exactly? I read somewhere that it corrects the pressure before entering the PIMPLE loop to ensure that mass conservation in the new time-step is guaranteed (and prevent interpolation errors from mapping the flow field to the new mesh in the next time-step). Is this true?

Thanks in advance!

BR,

A
aakie is offline   Reply With Quote

Old   January 2, 2019, 10:41
Default
  #22
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
Well I can't be certain without knowing your specific problem, but your remarks sound spot on. However you need to be certain that it is the solid body that is failing you.
I'd do the following:
Add a few function objects
  • forces
  • residuals
  • sixDoFRigidBodyState
Resdiuals to track your fluid side solution. And forces because maybe you are experiencing shock like pressure waves from upstream hitting your body and causing the rigid body solver to diverge. Or maybe your forces are non smooth, fluctuating for some other reason.
You need to be able to see if the outer iterations are still changing your solid body solution in a significant way. The sixDoFRigidBodyState function object only outputs one of the solutions per time step. Hence do something like this:
Code:
pimpleFoam >logfile
awk '/PIMPLE: iteration/ {print $3}' logfile >time.dat
awk '/Centre of rotation:/ {print $4,$5,$6}' logfile >centre.dat
paste time.dat centre.dat >result.dat
rm time.dat centre.dat
which should output something like this
Code:
1       (-3.7732466e-20 -0.13004702 3.5222828e-23)
2       (-3.7732466e-20 -0.13004702 3.5222828e-23)
3       (-3.7732466e-20 -0.13004702 3.5222828e-23)
1       (-3.2127178e-20 -0.12161195 6.2204482e-23)
2       (-3.2127178e-20 -0.12161195 6.2204482e-23)
3       (-3.2127178e-20 -0.12161195 6.2204482e-23)
1       (-2.6715625e-20 -0.11280664 8.2319332e-23)
2       (-2.6715625e-20 -0.11280664 8.2319332e-23)
3       (-2.6715625e-20 -0.11280664 8.2319332e-23)
...
if your solution is still changing in the outer iterations you may need additional ones / change the solver / lower the time step
arvindpj and aakie like this.
Bloerb is offline   Reply With Quote

Old   January 3, 2019, 12:56
Default Possible sources of error
  #23
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Quote:
Originally Posted by Bloerb View Post
Well I can't be certain without knowing your specific problem, but your remarks sound spot on. However you need to be certain that it is the solid body that is failing you.
I'd do the following:
Add a few function objects
  • forces
  • residuals
  • sixDoFRigidBodyState
Resdiuals to track your fluid side solution. And forces because maybe you are experiencing shock like pressure waves from upstream hitting your body and causing the rigid body solver to diverge. Or maybe your forces are non smooth, fluctuating for some other reason.
You need to be able to see if the outer iterations are still changing your solid body solution in a significant way. The sixDoFRigidBodyState function object only outputs one of the solutions per time step. Hence do something like this:
Code:
pimpleFoam >logfile
awk '/PIMPLE: iteration/ {print $3}' logfile >time.dat
awk '/Centre of rotation:/ {print $4,$5,$6}' logfile >centre.dat
paste time.dat centre.dat >result.dat
rm time.dat centre.dat
which should output something like this
Code:
1       (-3.7732466e-20 -0.13004702 3.5222828e-23)
2       (-3.7732466e-20 -0.13004702 3.5222828e-23)
3       (-3.7732466e-20 -0.13004702 3.5222828e-23)
1       (-3.2127178e-20 -0.12161195 6.2204482e-23)
2       (-3.2127178e-20 -0.12161195 6.2204482e-23)
3       (-3.2127178e-20 -0.12161195 6.2204482e-23)
1       (-2.6715625e-20 -0.11280664 8.2319332e-23)
2       (-2.6715625e-20 -0.11280664 8.2319332e-23)
3       (-2.6715625e-20 -0.11280664 8.2319332e-23)
...
if your solution is still changing in the outer iterations you may need additional ones / change the solver / lower the time step
Hi Bloerb,

Ah cool thanks! I will have look in to the structural solutions. Edit: I just collected the solutions from my log file. It seems that the structural displacement and velocities are equal for every PIMPLE loop outerCorrection for every time-step. In other words, the structural solution did not change within each time-step. This either means that moveOuterMeshCorrection is not working at this moment for OFv1806 (although it is being displayed in the log file, it is possible that nothing is actually being re-computed). How did you check if it worked on OFv1806 before?

Or it means that the case that I am running is weakly coupled and no sub iteration is required. Still divergence is observed in this case and I also double checked the following:

-The fluid residuals are well below the linear tolerance throughout the complete simulation
- PIMPLE tolerance were satisfied throughout complete simulation

then what else could be the cause for divergence? The structural solver? I run your script with the pendulum, it seemed my time step and symplectic was performing well. Btw, I am simulating vortex-induced vibrations of a 2D cylinder at Re = 3.6 * 10^6 with URANS k-w SST. In this problem, the forces are my main concern and they fluctuate with a certain vortex shedding frequency. The cylinder is attached to a damper and spring.

And would you have an idea what correctPhi does?

I realize a lot of questions, would be very very helpful if you could have a look. Thanks again Bloerb!!

BR,
A

Last edited by aakie; January 3, 2019 at 14:08.
aakie is offline   Reply With Quote

Old   January 4, 2019, 04:49
Default Strongly coupled solver in OpenFOAM
  #24
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Hi Bloerb,

I found the reason why my structural displacement/velocity did not change within one time-step. I used the symplectic solver so far for the sixDoFSolver. This solver is explicit. Usually, this does not mean necessarily imply that the FSI coupling is also handled explicit (the FSI coupling can be implicit, regardless of the structural solver).

Yet, as was pointed out in this thread (https://bugs.openfoam.org/view.php?id=1779), within the OpenFOAM algorithm, the structural solver IS the FSI coupling. So using a symplectic solver will not yield any different structural results for a new outer Corrector loop. However, selecting Newmark or CrankNicolson (both implicit solver) will actually yield different structural results for every new outer Corrector loop. Hence, to use the strongly-coupled solver capabilities of the sixDoFSolver, one should use either Newmark or CrankNicolson.

This might be evident...however I expected that the even though symplectic is an explicit solver, it would still be re used to compute a new structural displacement for every new outer Corrector (so it would have been handled implicitly within each time-step). This is not the case for the OpenFOAM algorithm, as was pointed out in the thread above. Therefore, I would recommend to always use accRelax = 1 and accDamp = 1 when one uses the symplectic solver. And also, I would recommend users to put off the moveMeshOuterCorrector when using the symplectic algorithm (it does not have an impact on the solution).

BR!

A
aakie is offline   Reply With Quote

Old   January 7, 2019, 00:21
Default
  #25
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
My thesis is on interDymFoam, which uses sixDoFRigidBodyMotionSolver. Motion solver does not matter as you have said because fluid solver will call the motion solver every iteration. So I believe if you need stability due to added mass and such, increase the PIMPLE loops to a larger number it will get a closer coupling, but still not fully tight.

For a solver to be absolutely tight (strongly coupled) you will need to adjust the fluid solver to only proceed when both fluid and motion converges.

Hope this helps.
haze_1986 is offline   Reply With Quote

Old   January 7, 2019, 09:35
Default Divergence or not>?
  #26
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Quote:
Originally Posted by haze_1986 View Post
My thesis is on interDymFoam, which uses sixDoFRigidBodyMotionSolver. Motion solver does not matter as you have said because fluid solver will call the motion solver every iteration. So I believe if you need stability due to added mass and such, increase the PIMPLE loops to a larger number it will get a closer coupling, but still not fully tight.

For a solver to be absolutely tight (strongly coupled) you will need to adjust the fluid solver to only proceed when both fluid and motion converges.

Hope this helps.
Hi Haze,

Thanks a lot for your reply. I understand your reasoning and I would tempt to agree. Yet, I have taken a deeper look into my log file and it seems that the structural displacements only change within one time-step under the Newmark/CrankNicolson solver (at least while using pimpleDyMFoam, I am not sure how this works for the interDyMFoam solver).

About your suggestion, I understand what you mean. I have computed the relative error for my last pimple Outer Correction compared to the second-last outer Correction. It turned out that my relative errors for the structural displacement stayed within <0.05 % throughout the complete simulation. I have attached such a matlab plot for you to see. This would imply that my FSI coupling is at least tight enough for this case, right? I also attached a time-history plot of the forces and displacement from the same simulation. It seems like the simulation is diverging, or maybe it is still in the transient phase and I would have to continue to run. The fluid residuals are well below the tolerances I specified (1e-08). Hence, I am curious to know what possibly could still cause divergence, please let me know what you think as I am eager to hear!

BR,

A
Attached Images
File Type: png Time History.png (33.6 KB, 45 views)
File Type: png FSI Error.png (13.6 KB, 31 views)
aakie is offline   Reply With Quote

Old   January 7, 2019, 09:59
Default
  #27
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Quote:
Originally Posted by aakie View Post
Hi Haze,

Thanks a lot for your reply. I understand your reasoning and I would tempt to agree. Yet, I have taken a deeper look into my log file and it seems that the structural displacements only change within one time-step under the Newmark/CrankNicolson solver (at least while using pimpleDyMFoam, I am not sure how this works for the interDyMFoam solver).

About your suggestion, I understand what you mean. I have computed the relative error for my last pimple Outer Correction compared to the second-last outer Correction. It turned out that my relative errors for the structural displacement stayed within <0.05 % throughout the complete simulation. I have attached such a matlab plot for you to see. This would imply that my FSI coupling is at least tight enough for this case, right? I also attached a time-history plot of the forces and displacement from the same simulation. It seems like the simulation is diverging, or maybe it is still in the transient phase and I would have to continue to run. The fluid residuals are well below the tolerances I specified (1e-08). Hence, I am curious to know what possibly could still cause divergence, please let me know what you think as I am eager to hear!

BR,

A
Good that you have thought this through. I feel obliged to share because I seem to have encountered almost the exact thing when I was developing my coupled solver.

First of all, I see that your values are diverging, which means that you might need more iterations per time step. Did you do a quick check? No need to change the code yet just change the no. of PIMPLE iterations. Increasing the number to about 15 should cause it to be more implicit.

Quote:
It turned out that my relative errors for the structural displacement stayed within <0.05 % throughout the complete simulation
Please do not use the displacement as a convergence criterion. Think about it, in the solver, force is used to estimate the acceleration, then acc is used to estimate the vel, and finally the vel used to estimate how much to move the mesh. The errors in motion is supposed to be very very small when converged, and 0.05 is definitely not enough (for my own case). What I have used is 1e-3 for the acceleration (same order of magnitude as the force). Vel difference between iterations is 1e-5, and motion is actually 1e-9. I took the effort in the past to monitor all these, I really hope this helps you.

Eventually you are going to modify the solver to only stop iterating when ur force or acc is below 1e-3. Or if you really want to use motion as a gauge, reduce it more, try 1e-9. You should need 15 iterations per time step.
aakie likes this.
haze_1986 is offline   Reply With Quote

Old   January 7, 2019, 10:07
Default
  #28
Member
 
Ilan
Join Date: Dec 2018
Posts: 52
Rep Power: 8
Magistrane is on a distinguished road
Hello there,

Haze, you speak about increasing the number of iterations for the solid part, but I don't know how to do so : as explained before, the number of solid iteration is define in the controldict. Is that the time step iteration that we have to change or is there another solid solver were we can control solid convergence ?

I use sixDoFRigidBodyMotion from 2.7 OpenFoam version with an accelerationRelaxation=0.3

Beside, how do you control acceleration, speed and motion convergence ?

Thanks for your help and happy new year !

Ilan
Magistrane is offline   Reply With Quote

Old   January 7, 2019, 10:28
Default
  #29
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
What I meant was increasing no. of pimple loops. U cant increase solid iterations as the fluid is your main solver. Every pimple loop the motion/solid is called once.

Quote:
accelerationRelaxation=0.3
This controls how much of your new acceleration is used and how much of the old. 30% new and 70% old. My case needed 0.1 or it just diverges. Case by case basis.

Quote:
Beside, how do you control acceleration, speed and motion convergence ?
You cant control them unless u revamp the code (I used 2.4.0 years ago, not sure if things have changed). The simulation jumps to the next time step as long as your fluid (PIMPLE) pressure and velocity converges. All u can do is to force a larger number of PIMPLE iterations, and because of that your motion solver also runs more iterations.

If you are interested to change the code, I can share more.
haze_1986 is offline   Reply With Quote

Old   January 7, 2019, 11:24
Default Strongly-coupled
  #30
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Quote:
Originally Posted by haze_1986 View Post
Good that you have thought this through. I feel obliged to share because I seem to have encountered almost the exact thing when I was developing my coupled solver.

First of all, I see that your values are diverging, which means that you might need more iterations per time step. Did you do a quick check? No need to change the code yet just change the no. of PIMPLE iterations. Increasing the number to about 15 should cause it to be more implicit.


Please do not use the displacement as a convergence criterion. Think about it, in the solver, force is used to estimate the acceleration, then acc is used to estimate the vel, and finally the vel used to estimate how much to move the mesh. The errors in motion is supposed to be very very small when converged, and 0.05 is definitely not enough (for my own case). What I have used is 1e-3 for the acceleration (same order of magnitude as the force). Vel difference between iterations is 1e-5, and motion is actually 1e-9. I took the effort in the past to monitor all these, I really hope this helps you.

Eventually you are going to modify the solver to only stop iterating when ur force or acc is below 1e-3. Or if you really want to use motion as a gauge, reduce it more, try 1e-9. You should need 15 iterations per time step.
Hi Haze,

Thanks a lot for your clear reply and for sharing this info. I see your point. I actually increased the number of outer correctors for the same case as discussed above. I forced 10 outer corrector loops by removing the fluid residuals (so that it would run 10 loops for every-time step for sure). I attached the time series and structural displacement error for that case as well. It seems to be still diverging. Yet, after a certain amount of iterations in the beginning, the relative errors are smaller for the case with 10 forced outer corrections.

In the beginning, something strange happens at t = 0.74 s:

1 0 1.636310917e-12 0.5
2 0 1.622618144e-12 0.5
3 0 1.579954747e-12 0.5
4 0 1.623626871e-12 0.5
5 0 1.566943691e-12 0.5
6 0 1.62800057e-12 0.5
7 0 1.560610613e-12 0.5
8 0 1.636571061e-12 0.5
9 0 1.556010601e-12 0.5
10 0 1.648379965e-12 0.5

It seems to switch between two solutions every iteration. There, the error I found was around 6% (see plot in matlab as well). I am wondering if the error at such a low time (t = 0.74 s) could affect the steady-state solution, what do you think?

And btw, my accRelax = 0.9 and accDamp = 1. Would a lower accRelax be a possible help in this case? I am not sure I have many more alternatives, besides indeed changing the code such that the fluid AND acceleration are used for convergence criteria every time-step. Because forcing more than 10 outer Corrections would require a lot of computational time (I am running at Re = 3.6*10^6).

Just to be sure, I computed the relative error for the displacement by: (y_disp(i=10)-y_disp(9))/y_disp(9) *100. Are your tolerances based on this same relative error as defined here (with the 100 multiplication)?

And lastly, do you really think that these seemingly low rel. errors can cause the system to diverge?

I realize a lot of questions, this is really helpful, thanks a lot!

BR,

A
Attached Images
File Type: png With 10 OuterCorr on.png (12.2 KB, 15 views)
File Type: png With10OuterCorr.png (16.1 KB, 15 views)
aakie is offline   Reply With Quote

Old   January 7, 2019, 11:53
Default
  #31
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Quote:
accRelax = 0.9 and accDamp = 1. Would a lower accRelax be a possible help in this case?
Yes I feel that this is too high, can you try it at 0.1? Yes i understand your convergence will also be slower and u will need even more iterations. But I would put priority on stability first, and must not diverge. There will be tricks to later speed up convergence, like dynamic relaxations (if you'd like to implement it in the code).
Ref: https://doi.org/10.1016/j.ijnaoe.2016.04.001

you can see the difference between using acceleration relaxation of 0.1 and 0.2 for a certain case. Aitken's under-relaxation can make it converge very fast and automatically calculate the acc relaxation you need.
haze_1986 is offline   Reply With Quote

Old   January 7, 2019, 12:38
Default Relaxation and initial errors
  #32
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Quote:
Originally Posted by haze_1986 View Post
Yes I feel that this is too high, can you try it at 0.1? Yes i understand your convergence will also be slower and u will need even more iterations. But I would put priority on stability first, and must not diverge. There will be tricks to later speed up convergence, like dynamic relaxations (if you'd like to implement it in the code).
Ref: https://doi.org/10.1016/j.ijnaoe.2016.04.001

you can see the difference between using acceleration relaxation of 0.1 and 0.2 for a certain case. Aitken's under-relaxation can make it converge very fast and automatically calculate the acc relaxation you need.
Oke thanks a lot, that makes sense. I am thinking.. if I do have rel. errors of higher than 0.05 with even 10 outer corrector fixed and accRelax = 0.9, could the relaxation factor actually contribute to lower the relative errors observed? Or does it just enhance the stability while the relative errors will remain?

And what do you think of the highers error in the first 2500 iterations (say, t < 3 sec), could that be a problem for the steady-state or can I neglect them as they are more related to the initialization of the system?

Edit: I uploaded the relative errors in log-log form (same lay-out as the paper you suggested for Aitken). It seems that with NouTer = 10, the relative error did not go much lower actually. And most of the higher errors are in the beginning part of the simulation. Is it not possible that my simulation is actually still developing towards a stable steady-state solution and that the beginning part may be ignored as part of the initalization?

Thanks again :-)

BR,
A
Attached Images
File Type: png ErrorC4LOG.png (19.2 KB, 27 views)
File Type: png FSIerrorC16LOG.png (21.8 KB, 20 views)

Last edited by aakie; January 7, 2019 at 13:49.
aakie is offline   Reply With Quote

Old   January 8, 2019, 05:22
Default
  #33
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Quote:
if I do have rel. errors of higher than 0.05 with even 10 outer corrector fixed and accRelax = 0.9, could the relaxation factor actually contribute to lower the relative errors observed? Or does it just enhance the stability while the relative errors will remain?
For my case as I lower accRelax, it prevents divergence. It couldn't even run above 0.1. The problem appears later on and it just crash. To your question, I'd say both.


Quote:
And what do you think of the highers error in the first 2500 iterations (say, t < 3 sec), could that be a problem for the steady-state or can I neglect them as they are more related to the initialization of the system?
I'd say thats normal for the start to require more iterations. As your system get into a steady state it should take less. If you interested only in steady state should be fine as long as it does not diverge.

Quote:
I uploaded the relative errors in log-log form (same lay-out as the paper you suggested for Aitken). It seems that with NouTer = 10, the relative error did not go much lower actually. And most of the higher errors are in the beginning part of the simulation. Is it not possible that my simulation is actually still developing towards a stable steady-state solution and that the beginning part may be ignored as part of the initalization?
Are these the position (x,y,z) errors? Could you show the normalised acceleration errors instead?
haze_1986 is offline   Reply With Quote

Old   January 8, 2019, 05:31
Default Collecting Acceleration
  #34
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Quote:
Originally Posted by haze_1986 View Post
What I have used is 1e-3 for the acceleration (same order of magnitude as the force). Vel difference between iterations is 1e-5, and motion is actually 1e-9. I took the effort in the past to monitor all these, I really hope this helps you.
How did you collect the acceleration if I may ask? Or did you take the spring force in the log file to monitor the acceleration?


Thanks! A
aakie is offline   Reply With Quote

Old   January 8, 2019, 05:40
Default
  #35
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Yeah I used sth from the log, can't really rem. by right u can select an option to report more force stuffs as well. If you want can share your log of one dt here.
haze_1986 is offline   Reply With Quote

Old   January 8, 2019, 05:58
Default Collecting Acceleration 2
  #36
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Quote:
Originally Posted by haze_1986 View Post
Yeah I used sth from the log, can't really rem. by right u can select an option to report more force stuffs as well. If you want can share your log of one dt here.
Ah oke, cause I also have the forces calculated by the force function Object, yet these are only displayed once per time-step.

Here an example of a log file for one dT:

Quote:
PIMPLE: iteration 1
forces forces:
Not including porosity effects

Restraint verticalSpring: attachmentPt - anchor (0 -0.9996182965 0) spring length 0.9996182965 force (0 -0.01368327546 0)
6-DoF rigid body motion
Centre of rotation: (0 0.0003817035054 0.5)
Centre of mass: (0 0.0003817035054 0.5)
Orientation: (1 0 0 0 1 0 0 0 1)
Linear velocity: (0 0.001267530344 0)
Angular velocity: (0 0 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 9.182850813e-07, No Iterations 497
DICPCG: Solving for pcorr, Initial residual = 0.2773392728, Final residual = 9.697462596e-09, No Iterations 504
time step continuity errors : sum local = 1.158396644e-18, global = 8.415305867e-21, cumulative = -2.028259814e-11
DILUPBiCG: Solving for Ux, Initial residual = 1.684384407e-05, Final residual = 2.996126134e-11, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 0.001433194031, Final residual = 6.930217978e-09, No Iterations 3
DICPCG: Solving for p, Initial residual = 0.001394417852, Final residual = 9.977486099e-07, No Iterations 149
DICPCG: Solving for p, Initial residual = 9.075744563e-05, Final residual = 9.602761993e-07, No Iterations 97
time step continuity errors : sum local = 5.177545632e-14, global = 4.81162129e-16, cumulative = -2.028211698e-11
DICPCG: Solving for p, Initial residual = 0.000155526306, Final residual = 9.450549601e-07, No Iterations 106
DICPCG: Solving for p, Initial residual = 1.082226796e-05, Final residual = 9.302326903e-07, No Iterations 30
time step continuity errors : sum local = 5.015663155e-14, global = 2.860491121e-16, cumulative = -2.028183093e-11
DICPCG: Solving for p, Initial residual = 8.666822769e-06, Final residual = 9.428351129e-07, No Iterations 14
DICPCG: Solving for p, Initial residual = 1.249528888e-06, Final residual = 9.850184293e-09, No Iterations 262
time step continuity errors : sum local = 5.311994343e-16, global = -1.815789794e-18, cumulative = -2.028183275e-11
DILUPBiCG: Solving for omega, Initial residual = 1.857285276e-09, Final residual = 1.944478738e-15, No Iterations 3
DILUPBiCGStab: Solving for k, Initial residual = 2.557600428e-05, Final residual = 1.162311529e-11, No Iterations 2
PIMPLE: iteration 2
forces forces:
Not including porosity effects

Restraint verticalSpring: attachmentPt - anchor (0 -0.9996182965 0) spring length 0.9996182965 force (0 -0.01368327546 0)
6-DoF rigid body motion
Centre of rotation: (0 0.0003817035054 0.5)
Centre of mass: (0 0.0003817035054 0.5)
Orientation: (1 0 0 0 1 0 0 0 1)
Linear velocity: (0 0.001267517345 0)
Angular velocity: (0 0 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 9.698607563e-07, No Iterations 415
DICPCG: Solving for pcorr, Initial residual = 0.0006345859211, Final residual = 9.511796955e-09, No Iterations 412
time step continuity errors : sum local = 1.073266018e-18, global = 5.512503448e-21, cumulative = -2.028183274e-11
DILUPBiCG: Solving for Ux, Initial residual = 3.590042149e-08, Final residual = 2.517905544e-13, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 1.686351033e-06, Final residual = 5.461368041e-13, No Iterations 3
DICPCG: Solving for p, Initial residual = 0.001188541047, Final residual = 9.83117173e-07, No Iterations 149
DICPCG: Solving for p, Initial residual = 8.695964405e-05, Final residual = 9.976461565e-07, No Iterations 92
time step continuity errors : sum local = 5.379793965e-14, global = -8.080610198e-16, cumulative = -2.02826408e-11
DICPCG: Solving for p, Initial residual = 0.0001548382681, Final residual = 9.975018369e-07, No Iterations 107
DICPCG: Solving for p, Initial residual = 1.063875005e-05, Final residual = 9.809859261e-07, No Iterations 29
time step continuity errors : sum local = 5.289927202e-14, global = -7.792653053e-16, cumulative = -2.028342007e-11
DICPCG: Solving for p, Initial residual = 8.693429072e-06, Final residual = 9.949428723e-07, No Iterations 18
DICPCG: Solving for p, Initial residual = 1.285631564e-06, Final residual = 9.554661094e-09, No Iterations 262
time step continuity errors : sum local = 5.153325503e-16, global = -3.736681018e-18, cumulative = -2.028342381e-11
DILUPBiCG: Solving for omega, Initial residual = 6.825334547e-10, Final residual = 1.15009097e-15, No Iterations 3
DILUPBiCGStab: Solving for k, Initial residual = 1.811342927e-08, Final residual = 4.969057802e-11, No Iterations 1
PIMPLE: iteration 3
forces forces:
Not including porosity effects

Restraint verticalSpring: attachmentPt - anchor (0 -0.9996182965 0) spring length 0.9996182965 force (0 -0.01368327546 0)
6-DoF rigid body motion
Centre of rotation: (0 0.0003817035054 0.5)
Centre of mass: (0 0.0003817035054 0.5)
Orientation: (1 0 0 0 1 0 0 0 1)
Linear velocity: (0 0.001267501646 0)
Angular velocity: (0 0 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 9.888187801e-07, No Iterations 414
DICPCG: Solving for pcorr, Initial residual = 0.0006193704578, Final residual = 9.778961522e-09, No Iterations 410
time step continuity errors : sum local = 1.075423195e-18, global = -3.524267141e-21, cumulative = -2.028342381e-11
DILUPBiCG: Solving for Ux, Initial residual = 1.630632033e-10, Final residual = 6.300394205e-15, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 6.172869521e-09, Final residual = 3.681347693e-13, No Iterations 3
DICPCG: Solving for p, Initial residual = 1.779118195e-05, Final residual = 9.808733247e-07, No Iterations 13
DICPCG: Solving for p, Initial residual = 1.338462978e-06, Final residual = 9.495351875e-07, No Iterations 1
time step continuity errors : sum local = 5.120329474e-14, global = 4.875084627e-19, cumulative = -2.028342332e-11
DICPCG: Solving for p, Initial residual = 4.469482892e-06, Final residual = 7.90350534e-07, No Iterations 5
DICPCG: Solving for p, Initial residual = 7.896706162e-07, Final residual = 7.896706162e-07, No Iterations 0
time step continuity errors : sum local = 4.25826921e-14, global = 6.948599827e-19, cumulative = -2.028342263e-11
DICPCG: Solving for p, Initial residual = 1.241507902e-06, Final residual = 7.420300849e-07, No Iterations 1
DICPCG: Solving for p, Initial residual = 7.425692345e-07, Final residual = 9.27703535e-09, No Iterations 127
time step continuity errors : sum local = 5.003560498e-16, global = -6.250290364e-18, cumulative = -2.028342888e-11
DILUPBiCG: Solving for omega, Initial residual = 6.524327434e-10, Final residual = 6.335551126e-16, No Iterations 3
DILUPBiCGStab: Solving for k, Initial residual = 1.006955002e-10, Final residual = 8.90037357e-13, No Iterations 1
PIMPLE: iteration 4
forces forces:
Not including porosity effects

Restraint verticalSpring: attachmentPt - anchor (0 -0.9996182965 0) spring length 0.9996182965 force (0 -0.01368327546 0)
6-DoF rigid body motion
Centre of rotation: (0 0.0003817035054 0.5)
Centre of mass: (0 0.0003817035054 0.5)
Orientation: (1 0 0 0 1 0 0 0 1)
Linear velocity: (0 0.001267500149 0)
Angular velocity: (0 0 0)
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 9.88338873e-07, No Iterations 423
DICPCG: Solving for pcorr, Initial residual = 0.0005760244241, Final residual = 9.956463292e-09, No Iterations 413
time step continuity errors : sum local = 1.084887585e-18, global = 2.052429111e-21, cumulative = -2.028342888e-11
DILUPBiCG: Solving for Ux, Initial residual = 7.041120528e-12, Final residual = 3.087103309e-15, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 1.489213037e-10, Final residual = 4.146979029e-14, No Iterations 3
DICPCG: Solving for p, Initial residual = 2.522778235e-06, Final residual = 2.251174841e-07, No Iterations 1
DICPCG: Solving for p, Initial residual = 2.223137548e-07, Final residual = 2.223137548e-07, No Iterations 0
time step continuity errors : sum local = 1.198824879e-14, global = -6.266063691e-18, cumulative = -2.028343514e-11
DICPCG: Solving for p, Initial residual = 1.520354725e-06, Final residual = 1.209594293e-07, No Iterations 1
DICPCG: Solving for p, Initial residual = 1.211115168e-07, Final residual = 1.211115168e-07, No Iterations 0
time step continuity errors : sum local = 6.530961062e-15, global = -6.26146584e-18, cumulative = -2.02834414e-11
DICPCG: Solving for p, Initial residual = 2.356771132e-07, Final residual = 2.356771132e-07, No Iterations 0
DICPCG: Solving for p, Initial residual = 2.356771132e-07, Final residual = 9.405616646e-09, No Iterations 94
time step continuity errors : sum local = 5.073771325e-16, global = -8.180496626e-18, cumulative = -2.028344958e-11
DILUPBiCG: Solving for omega, Initial residual = 6.34551416e-10, Final residual = 9.90019856e-16, No Iterations 3
DILUPBiCGStab: Solving for k, Initial residual = 8.789237703e-12, Final residual = 1.934818254e-13, No Iterations 1
PIMPLE: converged in 4 iterations
ExecutionTime = 219103.13 s ClockTime = 219281 s

forceCoeffs forceCoeffs_object execute:
Coefficients
Cm : -0.0002873681099 (pressure: -0.0002676579137 viscous: -1.971019622e-05)
Cd : 0.3592753034 (pressure: 0.3506192146 viscous: 0.008656088832)
Cl : -0.05322206165 (pressure: -0.05324576961 viscous: 2.370795981e-05)
Cl(f) : -0.02689839894
Cl(r) : -0.02632366272

fieldAverage fieldAverage write:
Calculating averages

Courant Number mean: 0.0146618383 max: 0.6999506145
deltaT = 0.003836589812
Time = 150.898939355531837
I noticed that every PIMPLE outer correction the spring force is displayed and you mentioned something with order of magnitude, could this be a good metric to monitor acceleration?

Thanks :-)

BR, A
aakie is offline   Reply With Quote

Old   January 8, 2019, 06:04
Default
  #37
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
I managed to dig up a really ancient picture. You are right the default solver do not have anything that really shows the force system convergence. The force shown in your log is the calculated spring restraint and not what we need.

https://drive.google.com/file/d/0B9t...ew?usp=sharing

Would u be able to go into the code and/or find out how to output the fGlobal, tauGlobal, a, tau in the picture to your log? The plot of that every iteration will be the best gauge of convergence.
haze_1986 is offline   Reply With Quote

Old   January 8, 2019, 06:16
Default
  #38
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 15
haze_1986 is on a distinguished road
Quote:
forceCoeffs forceCoeffs_object execute:
Coefficients
Cm : -0.0002873681099 (pressure: -0.0002676579137 viscous: -1.971019622e-05)
Cd : 0.3592753034 (pressure: 0.3506192146 viscous: 0.008656088832)
Cl : -0.05322206165 (pressure: -0.05324576961 viscous: 2.370795981e-05)
Cl(f) : -0.02689839894
Cl(r) : -0.02632366272
I am not familiar with these but they might be useful. If these are output every iteration try using it's relative error and plot it out as well.
haze_1986 is offline   Reply With Quote

Old   January 8, 2019, 06:17
Default Implementing Aitken
  #39
Member
 
A
Join Date: Jun 2016
Posts: 30
Rep Power: 10
aakie is on a distinguished road
Quote:
Originally Posted by haze_1986 View Post
I managed to dig up a really ancient picture. You are right the default solver do not have anything that really shows the force system convergence. The force shown in your log is the calculated spring restraint and not what we need.

https://drive.google.com/file/d/0B9t...ew?usp=sharing

Would u be able to go into the code and/or find out how to output the fGlobal, tauGlobal, a, tau in the picture to your log? The plot of that every iteration will be the best gauge of convergence.
Thanks a lot, makes a lot of sense to do something like that. Yeh I should be able to do that, I will have a chat with my supervisor

BTW, I read the paper on Aitken's dynamic relaxation factor integrated in OpenFOAM. I am very interested in to incorporate the following two items into my code:
1. Aitken dynamic relaxation
2. Motion convergence criteria

And possibly:
3. The improved implicit-explicit scheme they talk about in the paper.

Would you by any chance remember where I could find more info on how to implement these or pieces of useful code somewhere published in a thesis/paper? Any general tips are also welcome Thanks again man! Really great help.
BR, A
aakie is offline   Reply With Quote

Old   January 8, 2019, 14:31
Default
  #40
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 21
Bloerb will become famous soon enough
To get the acceleration or some other quantitiy i have made a small test:
add the attached folder to
src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotion/restraints/
afterwards add the following line to the src/sixDoFRigidBodyMotion/Make//files
Code:
$(restraints)/outputRestraint/outputRestraint.C
and now go to src/sixDoFRigidBodyMotion and compile it by typing wmake


You have now compiled a stripped down version of e.g the linearSpring restraint. This one does not alter anything and only outputs the desired values.
Code:
    restraintPosition = Zero;

    restraintForce = Zero;

    restraintMoment = Zero;

    if (motion.report())
    {
        Info<< tab
            //<<"p: "<< motion.centreOfRotation() 
            //<<"p: "<< motion.centreOfMass() 
            //<<"v: "<< motion.v() 
            <<"acceleration: "<< motion.state().a()
            << endl;
    }
You can hence add it like a linearSpring or a damper:

Code:
 restraints
{
    verticalSpring
    {
        sixDoFRigidBodyMotionRestraint linearSpring;
        anchor          (0 1 0);
        refAttachmentPt (0 0 0);
        stiffness       1.0;
        damping         0.0;
        restLength      1.0;
    }
    output
    {
        sixDoFRigidBodyMotionRestraint outputRestraint;
    }    
}
Which yields

Code:
Restraint output:       acceleration: (2.8064473e-18 8.2453831 1.8925816e-20)

With a bit of editing you can directly redirect this to a file using OFSTREAM and hence plot the desired values.
Attached Files
File Type: zip outputRestraint.zip (2.6 KB, 4 views)
Bloerb is offline   Reply With Quote

Reply

Tags
coupled, flutter, fsi, pimpledymfoam


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
Formulation in FSI problem with pimpleDyMFoam NewOrleans OpenFOAM Running, Solving & CFD 5 December 19, 2018 06:52
[ANSYS Meshing] Help with element size sandri_92 ANSYS Meshing & Geometry 14 November 14, 2018 08:54
Aerodynamic Coefs. have null value (Coupled FSI simulation with preCICE)) NJohnson SU2 1 March 29, 2018 17:12
Coupled FSI using ANSYS-FLOTRAN yusun Main CFD Forum 2 January 10, 2010 04:57
coupled FSI jai CFX 0 May 9, 2009 08:21


All times are GMT -4. The time now is 12:37.