|
[Sponsors] |
February 16, 2012, 02:51 |
iterating on other mesh
|
#1 |
Super Moderator
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41 |
Hello,
I have a simple question. My calculation is finished, but I forgot to define one wall-BC for computing force on it. (I don't want to recompute from 0) I just have to define my BC, and re-export my final (and right) mesh, and I need to iterate one time on new mesh (but from older mesh solution) for getting my force. How can I do that? Or is it a way to interpolate my solution from older mesh to new one? Thanks in advance
__________________
In memory of my friend Hervé: CFD engineer & freerider |
|
February 16, 2012, 12:20 |
|
#2 |
Senior Member
Phoevos
Join Date: Mar 2009
Posts: 104
Rep Power: 17 |
Hi Max,
I don't know exactly how you want to compute force and what you want to change with your BCs, but can't you simply change the BC at the last time step and change also the controldict file to add the force calculation (see here http://cfdcomputing.com/documents/drag_openfoam.htm also here http://www.cfd-online.com/Forums/ope...rces-of15.html)? Of course then you have to continue from latest time step, by modifying the controlDict file. If you want to interpolate your ready solution on your new mesh, you should use mapFields (see also here: http://www.openfoam.org/docs/user/st...-utilities.php), it does exactly what you want. See also the tutorial for the cavity in OpenFoam web page (http://www.openfoam.org/docs/user/ca...#x5-350002.1.9 - go to section 2.1.9). In the tutorial the solution of the lid-driven cavity is mapped on a clipped cavity and the solution goes on. I hope this helps you. Last edited by fivos; February 16, 2012 at 12:44. |
|
February 16, 2012, 16:38 |
|
#3 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello Maxime,
As long as your mesh is exactly the same, and all you do is add on a patch definition, then you only need to re-export the mesh into OpenFOAM, and make the following changes: In the controlDict file: 1. Set the "startFrom" option in controlDict to "latestTime" 2. Increase your "endTime" to some number higher than the current last iteration you have on disk 3. change "stopAt" to "writeNow" (This causes the simulation to run for one iteration, force the results to be written to disk, and then stop the simulation) In the field files (U, p, epsilon, k, etc...) in your last iteration, add on the boundary patch that you just added using the same conditions you have used for any of the other walls you have in the mesh. Now, rerun your solver (for example, simpleFoam). This will cause OpenFOAM to run the solver for one iteration, and write the results to disk. These last set of results will have the pressure distribution on your new patch too, which you can then use to calculate the force. In case you have any doubts, feel free to call :-)! Have a nice day! Philippose Rajan (BHRS) |
|
February 17, 2012, 01:32 |
|
#4 |
Super Moderator
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41 |
exactly what I wanted Philippose.
Great job! Thanks also fivos for your time
__________________
In memory of my friend Hervé: CFD engineer & freerider |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] surface mesh merging problem | everest | ANSYS Meshing & Geometry | 44 | April 14, 2016 06:41 |
Converting Starccm+ mesh | Ladnam | OpenFOAM | 0 | September 14, 2011 06:30 |
Meshing aifoil in ICEM | student123a | ANSYS Meshing & Geometry | 13 | December 8, 2010 10:40 |
2d irregular grid | Remy | Main CFD Forum | 1 | December 22, 2008 04:49 |
basic of mesh refinement | arya | CFX | 4 | June 19, 2007 12:21 |