|
[Sponsors] |
February 19, 2013, 11:21 |
|
#21 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sandeep,
Many thanks for the feedback! I should have posted the several tests I've made so far, because I did try several different ways of mapping the "pointDisplacement" field and respective mesh. That one in particular I think didn't work, although it's possible that I didn't manage to define the proper usage of each object and respective methods. Later today I'll post the attempts I've made at mapping the field. In the mean time, the problem is also hat I did further (re)searching on this topic, which lead me to thinking that I would need several more complex hacks that I found in OpenFOAM's source code, specifically the ones in:
Best regards, Bruno
__________________
|
|
February 19, 2013, 18:30 |
|
#22 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sandeep,
OK, I've got mixed results... First for the partially-good news: While using the hack to use the file system and by adding the sphere (named "oggetto") to the "noModificationPatches" and "noSwapPatches", it does allow to keep the sphere's surface in perfect condition while it moves.The bad news: I still haven't been able to make the proper update to work. I've tried to use the following code, but without success (this is the patch for the code):Other attempts I did in the past were, both in "mesquiteMotionSolver::update(...)":
Best regards, Bruno
__________________
|
|
February 20, 2013, 10:36 |
|
#23 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Bruno,
You could have the smoother work a little harder at each time step, and see if the simulation goes further. Specify a higher cpuTime value for tcInner and see if that helps. Also, you have edgeRefinement set to 'no', which means that cells cannot be collapsed, and that probably explains why you see negative volumes. You can play around with the growth factor to coarsen the mesh away from the 'oggetto' patch (not too agressive, otherwise you'll get too many collapses, which you can restrict using the maxModifications entry). I'll look into the mapping when I have some time on my hands. Sandeep |
|
February 20, 2013, 18:53 |
|
#24 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sandeep,
Many thanks for the hints! Unfortunately, by removing the cells that were in the way, the saved "pointDisplacement" of the internal field has a different number of cells, which leads the solver stopping to complain about the different array sizes. Nonetheless, this does give me (again) the idea for adopting a hack similar to the strategy used for "fixedValuePatches"... Best regards, Bruno
__________________
|
|
February 21, 2013, 11:16 |
|
#25 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Bruno,
Can you give me a test case that I can use? Also, you'll have to list out the details of how to reproduce the problem. Sandeep |
|
February 21, 2013, 13:23 |
|
#26 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sandeep,
Many thanks! Although I'll only be able to provide a clean/smaller case and more explicit instructions in about 5 hours from now In the mean time, the case is the one mentioned in post #13, namely: https://www.dropbox.com/s/bs3ehwn6xq...topo_v2.tar.gz Unpack and simply run pimpleDyMFoam. It should crash as soon as "boundaryConditions_().correctBoundaryConditions() " is called the second time around, if I'm not mistaken. moveDynamicMesh is not enough, due to the need for forces to work, which depend on "U" and "p"... This is assuming that the whole "dynamicTopoFvMesh" code only has the first two source code patches you provided on this thread, for using with OpenFOAM 2.1.x. Unless you prefer the hack I tried to use, relying on the file system, for which the "pointDisplacement" file was placed in the "constant" folder; the source code patch is on post #19. Best regards, Bruno
__________________
|
|
February 21, 2013, 17:52 |
|
#27 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Bruno,
I've committed a fix and your case seems to be running with point fields mapped. I haven't tried extensively with edgeRefinement on, so you might want to test it out. Unfortunately, since your length scales vary quite drastically across the 'wall' patch, the algorithm has a hard time trying to figure out what the optimal length scale is, and so you tend to get excessive bisections / collapses. You have a length scale for 'oggetto' specified as 0.2, while the paraview ruler tells me it's 0.002 - so you may want to check that. Until I have a more general solution, one workaround is to limit the number at each time-step using the maxModifications entry, or perhaps you could split up the patch into several smaller ones with a uniform length scale for each. Thanks for the bug-report. |
|
February 21, 2013, 19:47 |
|
#28 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Sandeep,
You're very welcome about the bug report! And many thanks for the fix and for the suggestions! And no wonder I couldn't figure it out... I was only looking at the source code for "mesquiteMotionSolver" Best regards, Bruno
__________________
|
|
February 26, 2013, 12:38 |
patch motion with dynamicTopoFvMesh
|
#29 |
Senior Member
joegi
Join Date: Nov 2009
Location: genoa
Posts: 104
Rep Power: 17 |
Hi Sandeep,
I wonder if there is a difference between the implementation of patch motion between dynamicTopoFvMesh and dynamicMotionSolverFvMesh?. I am trying to do a simple oscillating body simulation by using both libraries and the output of the patch motion is totally different (about an order of magnitude in amplitude). Using dynamicMotionSolverFvMesh i set the moving patch in pointDisplacement as follows: Code:
wing { type oscillatingDisplacement; value uniform ( 0 0 0 ); amplitude ( 0 0.2 0 ); omega 6.28318; } Using dynamicTopoFvMesh/mesquite I set the moving patch in dynamicMeshDict exactly in the same way, by just adding Code:
wing { type oscillatingDisplacement; value uniform ( 0 0 0 ); amplitude ( 0 0.2 0 ); omega 6.28318; } Any clue?, jg |
|
February 26, 2013, 12:48 |
|
#30 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
I see that both your entries are the same, but how different is "totally different"? What was your output? If you post your entire dynamicMeshDict file, that would be helpful.
|
|
February 26, 2013, 13:06 |
patch motion with dynamicTopoFvMesh
|
#31 |
Senior Member
joegi
Join Date: Nov 2009
Location: genoa
Posts: 104
Rep Power: 17 |
Hi,
Ok, this is the entry where i set the patch motion Code:
solver mesquiteMotionSolver; dynamicFvMesh dynamicTopoFvMesh; dynamicFvMeshLibs ("libdynamicTopoFvMesh.so"); motionSolverLibs ("libfvMotionSolvers.so" "libmesquiteMotionSolver.so"); mesquiteOptions { // Optimization metric optMetric AspectRatioGamma; // Objective function objFunction LPtoP; // Optimization algorithm optAlgorithm FeasibleNewton; // Termination criteria sub-dictionary (takes default values if not specified) // Specifying an empty sub-dictionary terminates with available options tcInner { absGradL2 1e-4; cpuTime 1.25; } // tcOuter // {} // For composite functions, two objectives need to be specified firstFunction LPtoP; secondFunction LInf; // For scaled functions, scale and objective needs to be specified // scaleFunction PMeanP; // scale 1.5; // Power value for the LPtoP objective function pValue 2; power 2; // Specify a tolerance for the CG solver tolerance 1e-2; // Specify number of CG sweeps nSweeps 1; // Specify slip patches for the motionSolver slipPatches { } // Set run-time debug level debug 0; // Specify interval for surface smoothing surfInterval 1; //- Specify fixedValue patches for the motionSolver fixedValuePatches { ball { type oscillatingDisplacement; amplitude (0.1 0 0); omega 6.28316; value uniform (0 0 0); } } } Even if I set the entry usePointDisplacement yes, and use the pointDisplacement dictionary (same one as the one used with dynamicMotionSolverFvMesh), the patch motion of both libraries are different. |
|
February 26, 2013, 13:12 |
|
#32 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
And what's the output?
|
|
February 26, 2013, 13:29 |
|
#33 |
Senior Member
joegi
Join Date: Nov 2009
Location: genoa
Posts: 104
Rep Power: 17 |
The simulation runs fine (I am using moveDynamicMesh), the smoothing works fine, the remeshing works fine. But, nevertheless the fact that I am using the same patch motion for both dynamic meshing classes (libdynamicTopoFvMesh and dynamicMotionSolverFvMesh), I think the motion I am getting with libdynamicTopoFvMesh is not the right one, the amplitude is like one order of magnitude higher compare to the output of dynamicMotionSolverFvMesh.
|
|
February 26, 2013, 13:43 |
|
#34 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Ah... I know what the problem is:
It appears that the oscillatingDisplacement patchField provides an absolute value of displacement (from the mean), while the applyFixedValuePatches() function in mesquiteMotionSolver expects an incremental displacement vector for each time-step. You see the acceleration because the displacement is continuously updated as: refPoints_ += dPointField; in mesquiteMotionSolver.C You could write a new boundary condition similar to oscillatingDisplacement which provides displacement increments, or alternatively, I also provide a timeVaryingDisplacement patchField in the repository that uses an interpolation table from file, which might be easier. I would have to look into a fix for the absolute vs. incremental confusion. Can you try changing the "+=" operator in applyFixedValuePatches to simply "=" and see if that makes a difference? |
|
February 26, 2013, 14:12 |
|
#35 |
Senior Member
joegi
Join Date: Nov 2009
Location: genoa
Posts: 104
Rep Power: 17 |
It crash immediately.
Let's see if I can write the bc, in anycase I am not in a hurry, so probably you will come with a solution first. Does this affect the behavior of the 6DOF solver? it is safe to use? Have a nice day, joel |
|
February 26, 2013, 14:14 |
|
#36 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
Can you post a test case with dynamicMeshDict entries for both solver types?
|
|
February 27, 2013, 04:26 |
|
#37 |
Senior Member
joegi
Join Date: Nov 2009
Location: genoa
Posts: 104
Rep Power: 17 |
Hi Sandeep,
You can use the ballTranslation tutorial from the last openfoam workshop. Use the attached files to run the case using dynamicMotionSolverFvMesh. I tested everything and runs fine. Running this two cases you clearly see the difference in the patch motion between the two solvers. Have a nice day, joel |
|
February 27, 2013, 11:54 |
|
#38 |
Senior Member
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25 |
joel,
Can you try the angularOscillating variant with zero angular velocity and see if there's a difference between both solvers? Thanks |
|
March 1, 2013, 06:44 |
|
#39 |
Senior Member
joegi
Join Date: Nov 2009
Location: genoa
Posts: 104
Rep Power: 17 |
Hi Sandeep,
Same problem with angularOscillatingDisplacement. Joel |
|
March 13, 2013, 07:24 |
|
#40 |
Senior Member
joegi
Join Date: Nov 2009
Location: genoa
Posts: 104
Rep Power: 17 |
Hi Sandeep,
Any update regarding this issue? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Questions about modeling of a reservoir | hwangpo | CFX | 7 | October 30, 2012 22:46 |
possible interview questions | atturh | Main CFD Forum | 1 | February 21, 2012 09:53 |
Interview Questions | Carna | FLUENT | 0 | December 26, 2011 05:35 |
NACA0012 Validation Case Questions | ozzythewise | Main CFD Forum | 3 | August 3, 2010 15:39 |
Questions about CFD | Lebeau alexandre | Main CFD Forum | 1 | April 6, 1999 15:23 |