|
[Sponsors] |
June 21, 2017, 06:54 |
Trying to compile a new DynamicFvMesh Solver
|
#1 |
New Member
Miguel García Casas
Join Date: Jun 2017
Posts: 3
Rep Power: 9 |
Hello everyone,
I'm Miguel and I'm doing an internship simulating a marine turbine with openFoam. I've just developed a case with a constant angular velocity in the rotor using dynamicMesh and pimpleDyMFoam. Now I want to develope a case in which the angular velocity is calculated by the moment acting in the blades due to the kinetic energy of the current. This case is not integrated in OF so I'm trying to modify the rotatingMotion solver in dynamicFvMesh but I'm not getting results because I have no good C++ skills. Attached to this post there is a first aproach to the solution. Inside the zip file there are the original dynamicFvMesh solver from OF4.1 named "dynamicFvMesh.0" and the modified version to calculate the angular velocity by the forces named "dynamicFvMesh". In the last one the main modification is into dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/VarRotatingMotion/VarRotatingMotion.C It would be great if someone can help me or he/she had done it before. Thank you! |
|
July 6, 2017, 13:28 |
|
#2 |
Senior Member
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10 |
i am also trying to include dynamic mesh in intercondensatingevaporatingfoam from openfoam v1612+ but can't get far bcz i am having very limited c++ skills. u having better luck??
|
|
July 7, 2017, 05:41 |
|
#3 |
New Member
Miguel García Casas
Join Date: Jun 2017
Posts: 3
Rep Power: 9 |
Well, I got what I want but in Foam-Extend 4.0 where the code used to move the mesh is easier to undertand and to modify.
My C++ skill is better than when I started this project but so limited yet. I suggest you to see a solver code as pimpleFoam and compare with his dynamic version code pimpleDyMFoam. Maybe you could see what you need to introduce in your solver. Have luck! |
|
July 9, 2017, 15:21 |
|
#4 |
Senior Member
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10 |
already tried the comparison! problem is the codes of openfoam v1612+ are entirely different from previous openfoam versions
|
|
July 10, 2017, 06:08 |
|
#5 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18 |
Hi,
For your case, I would say compare interFoam vs interDyMFoam because ``intercondensatingevaporatingfoam`` is basically interFoam + ``temperaturePhaseChangeTwoPhaseMixtures`` library. You have to check the following points;
A side note: if you are planing to use this solver for closed domains, it does not work. The mass isn't conserved for closed domains. Best wishes, Hassan |
|
July 10, 2017, 18:35 |
closed domain
|
#6 | |
Senior Member
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10 |
Quote:
thanks for such a precise reply!! secondly you mentioned two imp things i.e. dynamic mesh object and closed domain i have no idea about dynamic mesh object? and do i create in create fields? and my domain is a cylinder with 2 inlet and 1 outlet so i guess its open could you plz elaborate these points thanks in advance |
||
July 11, 2017, 06:46 |
|
#7 |
Senior Member
Hassan Kassem
Join Date: May 2010
Location: Germany
Posts: 242
Rep Power: 18 |
Hello,
Indeed your case is considered an open domain. Regarding the dynamic mesh object, you need to include "createDynamicFvMesh.H" instead of "createMesh.H". A line by line comparison between interFoam and interDyMFOAM will give you a clear indication about what is needed for your solver. Best wishes, Hassan |
|
July 11, 2017, 18:46 |
converting the solver
|
#8 | |
Senior Member
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10 |
Quote:
if i make some progress, i will keep you posted on this thread/ thanks |
||
July 25, 2017, 13:19 |
|
#9 |
Senior Member
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10 |
greetings!!!
i tried your way. i compared codes of interfoam and interdymfoam.I also compared interphasechangeFoam AND InterphasechangeDyMFoam i found that interphasechangefoam and interphasechangedymfoam is developed on very similar lines as intercondensatingevaporatingfoam i noticed the changes line by line. i included the following changes 1. mesh.update() and DynamicFVMesh, createdynamicFVMESH, readtimecontrols in intercondensatingevaporatingDyMfoam 2 .included changes adjust function in P.eqn 3. correct phi is also included in intcondensevapDyMfoam. [correctPhi copied from interphasechangedymfoam] 4.createdymcontrols.h now my problem is how is alphacontrols.h , Alphaeqnsubcyle.h is included in intercondensatingfoam i have added my whole work in the form of pics and dument of comparison can u plz take a look?? https://drive.google.com/file/d/0B9A...ew?usp=sharing https://drive.google.com/file/d/0B9A...ew?usp=sharing https://drive.google.com/file/d/0B9A...ew?usp=sharing https://drive.google.com/file/d/0B9A...ew?usp=sharing Last edited by saddy; July 26, 2017 at 07:23. Reason: mis spelt |
|
July 29, 2017, 08:45 |
|
#10 |
Senior Member
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10 |
UPDATE
Hey i just successfully compiled the solver intercondensatingfoam to intercondensatingDyMFoam I renamed the solver thermalFoam and thermalDyMFoam the solver can be compiled by simply running ./Allwmake i am attaching it here https://drive.google.com/open?id=0B8...XNXTXhJRGhkY1U just copy paste it in openfoam-v1612+ solvers directory and run ./Allwmake i used dynamicmeshdict of interdymfoam the solver is running and shows its selecting dynamicrefinefvmesh but i see refinement. on alpha However inteface of alpha is still hazy and diffused?? can you please take a look Last edited by saddy; July 29, 2017 at 10:42. |
|
July 29, 2017, 12:48 |
|
#11 |
Senior Member
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10 |
yeah....right....nobody....replied....
guess what.....well i did it on my own...!!!!peace |
|
June 1, 2019, 18:13 |
Dynamic Mesh in OpenFoam Forks/Flavors
|
#12 |
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 83
Rep Power: 9 |
Hi Foamers,
After I've checked the three forks of openfoam (from openfoam.org, openfoam.com and the foam-extend) I noticed that the dynamic mesh classes (especially the ones for topochange) it's readily available to use only in the foam-extend fork. For the other forks (from openfoam.com for instance) the source code for those libraries are available but not compiled. Compiling these libraries is not a straightforward task and needs a very good knowledge in the involved C++ data structure and compilation. The same has done in some research groups but not publicly available. I wonder if somebody can provide a compilation guide for these libraries, I think it will be very useful. Regards, Saleh |
|
June 1, 2019, 20:08 |
Dynamic Mesh in OpenFoam Forks/Flavors
|
#13 |
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 83
Rep Power: 9 |
Hi again.
It seems I was wrong about the difficulty of compiling the dynamic mesh libraries which contain the topochangers. I was able to do it with openFoam1806 release (and it should work for other releases from openfoam.org as well) using the following steps: - Compile the following Make folder using wmake libso if you want to keep it in the installation folder. You can compile it in your user folder too /opt/OpenFOAM-v1806/src/dynamicMesh/Make don't forget to change the authority for the installation folder - Now you can take any simple tutorial which uses the dynamicMesh and include the topoChanger library in the controlDict file: libs ("libtopoChangerFvMesh.so"); - You should be able now to see them if you use the banana trick in the dynamicMeshDict: dynamicFvMesh banana; In the same compiled libraries there are extra motion solvers as well, it you want to use them, include the following library in your controlDict: libfvMotionSolvers.so I hope that we will be useful Regards, Saleh |
|
Tags |
boiling, compile, dynamic mesh, openfoam 4.1, openfoam-v1612+, rotating domain |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to compile a new solver in OpenFOAM-2.1.0? | sandy | OpenFOAM Programming & Development | 24 | July 27, 2016 05:10 |
Quarter Burner mesh with periosic condition | SamCanuck | FLUENT | 2 | August 31, 2011 12:34 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
How to compile an unsteady solver based on solver of MRFSimpleFoam? | renyun0511 | OpenFOAM Running, Solving & CFD | 0 | April 27, 2010 12:16 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 15:08 |