|
[Sponsors] |
March 15, 2023, 10:15 |
Rookie needs help with waves and AMI
|
#1 |
New Member
Timo Siltala
Join Date: Mar 2023
Posts: 5
Rep Power: 3 |
Dear Foamers,
I have a case of classical waterwheel being partly submerged in flowing water and waves. I started with 2D case. What I have succeeded to do is: -Installed OF 2212 without knowing too much about the different versions, mostly because many examples I found were using this com-branch of OF and it was the default offer in Ubuntu. -Modelled a wave pool using dynamic (pointDisplacement) inlet patch, got it working but noticed that the entire mesh deforms. Couldn't change this by splitting the mesh into zones so swopped to alpha.water StokesV wave generation (presumably adjusting surface height). -Modelled the case with two zones: "out" being the environment and "wheel" the rotating part. I assumed that a cylindrical mesh zone for "wheel" would be the best because of the waterwheel geometry. That I connected to "out" zone with AMI definition. -Got the model filled to wanted level with alpha.water. Then starts the sad part. I couldn't find any comprehensive documents about my 2212 version, for example what parameters sixDoFRigidBodyMotionCoeffs have and how to get a working combination for them. The only available document is a class reference which doesn't make me any smarter. If there is somewhere a good manual about solvers and their options, a link would be most appreciated. I took also a glimpse to V10 docs, but there were many solver related details not present in my version. On the other hand 2212 users manual tells that 2212 interFoam should be capable for dynamic mesh in addition to two fluids with free surface. So I believed that and tried to get forward. After several weeks of trial an error I even bought an example from one Youtube site, but that didn't get me any further because it used overset mesh instead of AMI. There are many studies which have been using the wanted combination, but presumably the authors have seen it too childish to attach even the input files without meshes to the reports. So I have been trying to take a snippet here and there, but it seems to be a dead end. Therefore I ask for a link or other source where I could find necessary run files, preferably with explanations why something is done as is. I suspect that I haven't got the solvers correctly chosen or defined because my run goes fine without anything happening. Lots of CPU:s it uses anyway, so at least I have got a busy feeling... |
|
March 18, 2023, 04:20 |
Time step continuity error
|
#2 |
New Member
Timo Siltala
Join Date: Mar 2023
Posts: 5
Rep Power: 3 |
Lots of trials with different controls. Now the time step in ridiculous short and number of iterations and corrections are very high. Still the model does not converge. Can anyone say is my choise of alpha waves with rotating AMI rigid mesh something that can't ever converge due to some mathematical reason? I have tried bot interFoam and overInterDyMFoam. Problem is, that the examples seen in Youtube don't mention anything about their choises, they may even include proprietary code written by the authors. Knowing that for sure would help me making a desicion to give up.
|
|
March 18, 2023, 05:17 |
|
#3 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
Quote:
No. If you were using different and more stable software, it would be very different. Many times the amount of torture is tied to the choices we make in software we chose. |
||
March 18, 2023, 08:57 |
Still debugging
|
#4 |
New Member
Timo Siltala
Join Date: Mar 2023
Posts: 5
Rep Power: 3 |
Thanks Arjun. I agree, however I have succeded with open source FEM and CAD software for a long time, so I decided to take a chance with OpenFOAM. I picked the 2212 version without knowing the differences between branches, did I make wrong choise? Short sniffing indicates that V10 has a lot more comprehensive documents, however I got the impression that 2212 has more stable development due to commercial services available. What I find quite problematic, is missing detailed docs about different options and their use together with different solvers. Learning by guessing takes a lot of time.
Now trying to get forward in my learning, I am facing a problem while debugging. My model solves alpha and U fine, but no tolerance seems to be tight enough for p_rgh convergence and along consequent attempts the solution diverges and OpenFOAM crashes: DICPCG: Solving for p_rgh, Initial residual = 0.000529223, Final residual = 5.23176e-06, No Iterations 103 DICPCG: Solving for p_rgh, Initial residual = 1.78395e-05, Final residual = 1.76337e-07, No Iterations 239 DICPCG: Solving for p_rgh, Initial residual = 1.19652e-06, Final residual = 1.17209e-08, No Iterations 210 DICPCG: Solving for p_rgh, Initial residual = 9.17979e-08, Final residual = 8.95166e-10, No Iterations 200 DICPCG: Solving for p_rgh, Initial residual = 8.28268e-09, Final residual = 8.2076e-11, No Iterations 233 DICPCG: Solving for p_rgh, Initial residual = 7.38742e-10, Final residual = 7.36035e-12, No Iterations 187 DICPCG: Solving for p_rgh, Initial residual = 6.48031e-11, Final residual = 6.39284e-13, No Iterations 192 DICPCG: Solving for p_rgh, Initial residual = 6.8172e-12, Final residual = 6.80867e-14, No Iterations 170 DICPCG: Solving for p_rgh, Initial residual = 7.46255e-13, Final residual = 7.41144e-15, No Iterations 197 DICPCG: Solving for p_rgh, Initial residual = 9.65204e-14, Final residual = 9.81184e-16, No Iterations 59 time step continuity errors : sum local = 9.94493e-14, global = 5.50364e-15, cumulative = -5.93182e-13 There are some discussions in Forum, but none describing this kind of situation. What could be the reason and how can one find it? I have not found any flags creating more verbose log file for debugging, so it is trial and error now. Any tips are most wellcome. |
|
March 26, 2023, 17:07 |
Some progress but still in problems
|
#5 |
New Member
Timo Siltala
Join Date: Mar 2023
Posts: 5
Rep Power: 3 |
I got a bit forward. Managed to get a solitary wave working in my mesh with cylindrical rotating AMI interface when the rotating mesh was fixed or rotating slowly. It works but isn't what I am looking for (dynamicMeshDict):
motionSolverLibs ("libfvMotionSolvers.so"); dynamicFvMesh dynamicMotionSolverFvMesh; solver solidBody; cellZone rotor; solidBodyMotionFunction rotatingMotion; origin (0 0.5 0); axis (0 1 0); omega constant -0.06283; Then I tried getting the flow rotating the mesh with this (dynamicMeshDict): dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libsixDoFRigidBodyMotion.so"); solver sixDoFRigidBodyMotion; //diffusivity quadratic inverseDistance; //No effect sixDoFRigidBodyMotionCoeffs { report on; patches (AMI1); //AMI radius 2.9m with very dense mesh // cellZone rotor; // no effect innerDistance 2.8; outerDistance 3; orientation ( 1 0 0 0 1 0 0 0 1 ); centreOfMass (0 0.5 -2.55); //-2.9+0.1+0.25=-2.55 mass 100; //kg momentOfInertia (325 325 325); //0.5*m*r^2=0.5*100*2.55^2 g (0 0 -9.81); rho rhoInf; rhoInf 1025; //kg/m^3 // accelerationRelaxation 0.95; //no effect // accelerationDamping 0.95; //no effect solver { type Newmark; } constraints { fix_point { sixDoFRigidBodyMotionConstraint point; point (0 0.5 0); } fix_axis { sixDoFRigidBodyMotionConstraint axis; axis (0 1 0); } } restraints { } } Model runs for quite long, but with no convergence. DeltaT is small enough for AMI to move only a small fraction of cell dimension: Finally the run just crashes and I can't find any indications what causes it: Courant Number mean: 0.000526583 max: 0.679779 Interface Courant Number mean: 8.21639e-06 max: 0.301419 deltaT = 0.000648194 Time = 0.195463 PIMPLE: iteration 1 forces forces: rho: rhoInf Freestream density (rhoInf) set to 1025 Not including porosity effects 6-DoF rigid body motion Centre of rotation: (0 0.5 -2.55) Centre of mass: (0 0.5 -2.55) Orientation: (0.999984 0 -0.00563696 0 1 0 0.00563696 0 0.999984) Linear velocity: (0 0 0) Angular velocity: (0 -0.0682392 0) AMI: Creating addressing and weights between 1862 source faces and 1544 target faces AMI: Patch source sum(weights) min:0.391325 max:1.04093 average:0.99946 AMI: Patch target sum(weights) min:0 max:1.0359 average:0.999419 Updating Boussinesq wave model for patch inlet ... had to cut for character limit... Of course I appreciate any comments getting me forward, but even more explanation what's happening and how one can dig into daylight the core reason for crash. That would help a lot in the future. I assume there are some kind of tools for that. Now all residuals remain in tolerances recommended by multiple sources, but the time step continuity error is always present with almost vanishing tolerance. Is that something one should care for? Having about 150000 cells most probably generate that size of tolerance due to floating point roundings. |
|
Tags |
beginner ami waves |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
interDyMFoam for surface waves of rotating propeller | jppsydt | OpenFOAM | 0 | June 16, 2017 09:57 |
dynamicMeshDict for FSI-driven AMI motion | jbcourt | OpenFOAM | 1 | August 19, 2016 07:10 |