|
[Sponsors] |
January 6, 2011, 17:12 |
dieselEngineDyMFoam
|
#1 |
Senior Member
Join Date: Oct 2009
Posts: 140
Rep Power: 17 |
Hi Foamers,
Does anyone of you know how to make from dieselengineFoam ->dieselEngineDyMFoam? I woul like to use the mesh strategies from the engineTopoChangerMesh class. Thx Peter |
|
November 21, 2012, 01:02 |
|
#2 |
Member
Anthony Nitski
Join Date: Aug 2009
Location: Earth
Posts: 35
Rep Power: 17 |
I have same question. How to modify dieselEngineFoam to work with layer addition and removal ? I use 1.6-ext...
|
|
November 21, 2012, 07:35 |
|
#3 |
Senior Member
Join Date: Oct 2009
Posts: 140
Rep Power: 17 |
Hi,
you have to include following header files in your solver before the main part will be executed. #include "engineTopoChangerMesh.H instead of #include "dynamicFvMesh.H" change mesh.move() to mesh.update() Furthermore, you have to link the compiler to this lib with -ltopoChangerFvMesh in EXE_LIBS cheers Peter |
|
November 22, 2012, 06:06 |
|
#4 |
Member
Anthony Nitski
Join Date: Aug 2009
Location: Earth
Posts: 35
Rep Power: 17 |
Thanks, Peter!
Already figured out the issue. I did some change in code similar to the sonicTurbDyMEngineFoam.C Here is diff dieselEngineDyMFoam.C dieselEngineFoam.C 35,37c35 < #include "engineTopoChangerMesh.H" --- > #include "engineMesh.H" 55,56c53 < # include "createEngineDynamicMesh.H" --- > # include "createEngineMesh.H" > 82,83c79 < mesh.update(); --- > mesh.move(); And make diff options is 18,21d17 < -I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \ < -I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \ < -I$(LIB_SRC)/dynamicMesh/topoChangerFvMesh/lnInclude \ < -I$(LIB_SRC)/meshTools/lnInclude 41,45c37 < -llduSolvers \ < -ldynamicFvMesh \ < -ldynamicMesh \ < -ltopoChangerFvMesh \ < -lmeshTools --- > -llduSolvers |
|
December 12, 2012, 06:06 |
engineGeometry
|
#5 |
Member
Anthony Nitski
Join Date: Aug 2009
Location: Earth
Posts: 35
Rep Power: 17 |
Hello, foamers!
Mоdified solver dieselEngineDyMFoam removes layers correсtly, but crashes in first layer addition. Please explain purpose of the coordinate system (how it should be oriented for a piston patch? what means origin, direction and axis? ), as well as other parameters in engineGeometry dict. I use engineTopoChangerMesh layerAR; minLayer 0.002; maxLayer 0.005; delta 0.001; offSet 0.002 // i gues, it means "work area" for add/removal. In which direction?? And offset from which point?? My mesh is 0.005 m in Z directions... piston { patch piston; coordinateSystem { // type Cartesian; type cylindrical; origin (0 0 0); axis (0 0 1); // direction (0 1 0); direction (1 0 0); } minLayer 0.002; maxLayer 0.005; } |
|
December 12, 2012, 13:28 |
|
#6 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
I'll tackle this one as layer addition/removal is something I managed to get working after a long struggle.
Offset is how far away from the highest z value of the piston patch you want to start looking for your add/remove surface. So if your piston patch has max z coordinate of -0.02 m, establishing the add/remove surface will begin looking there. If offset = 0, then the faces of the piston patch itself will be used (unless your piston patch is reasonably flat, don't do this) delta is the range where you want to look for faces to make the add/remove surface. if delta is 0.001 m, then all faces in the range [-0.021, -0.019] will be eligible for being part of the add/remove surface. Its always good to check the pistonLayerFaces faceZone that is created to ensure that the resulting faceZone is a singly connected surface, and that there aren't any faces whole normal deviates much from the z direction (if you create the surface with offset > 0, this should be okay). Coordinate system is for the creation of the piston (which is a member of the layerAR class). As long as the coordinate system is aligned with your simulation domain (which looks like what you have done). Hope this helps! Note that the entire engine library can be ported to work with 2.1.x. |
|
December 13, 2012, 05:10 |
|
#7 |
Member
Anthony Nitski
Join Date: Aug 2009
Location: Earth
Posts: 35
Rep Power: 17 |
mturcios777, thanks for your comment!
So, my setup in engineGeometry looks reasonable for me. But i still get FPE in layer addition. And no printStack output... I attached a mesh and pistonLayer facezone pictures for last saved CAD (deformAngle=20) Why OpenFoam does not produce printStack output in that case? How to debug what goes wrong with layer addition? ---After a while---- I discover, that moveDyMEngineMesh works fine when it start adding layers after deformAngle CAD. And dieselEngineDyMFoam crashes in layerAR.C, in autoPtr<mapPolyMesh> topoChangeMap = topoChanger_.changeMesh(); .... Last edited by u22; December 13, 2012 at 08:17. |
|
December 13, 2012, 13:26 |
|
#8 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Ok, I'm assuming that the flat faces above your piston patch are the faceZone, so they look good. Not sure why the stack trace isn't output, though since the error looks like its occurring inside layerAR, you should probably turn on the debug options for polyTopoChange, polyTopoChanger, layerAdditionRemoval and dynamicMesh.
I would also recommend removing the cell/face/pointZones and meshModifiers file in your starting mesh every time until you are sure that the problem isn't from the mesh. It doesn't take that long to regenerate them when you start the simulation, plus if you've made changes to the layerAR in engineGeometry, it won't be updated until you delete all those files (have a look at addLayerARMeshModifiers.C). Also, try switch to a cartesian coordinate system. You'll definitely need to remove the zones and modifiers to see the change (if any). |
|
December 14, 2012, 06:35 |
|
#9 |
Member
Anthony Nitski
Join Date: Aug 2009
Location: Earth
Posts: 35
Rep Power: 17 |
Marco, thanks for help again.
1. I run simulation from -180 with cartesian CS and get same error 2. I compiled OF 1.6-ext with DEBUG , but didn't get no additional output in log file how to switch on debug for polyTopoChange and etc.? I see many of "if(debug) ..." lines there 3. moveDyMEngineMesh works fine for my case. WHY? This is realy bother me. 4. May be, I need some additonal changes in dieselEngineFoam.C, not only replacing mesh.move() by mesh.Update(). code in sonicTurbDyMEngineFoam looks more sofisticated then just "mesh.Update". Could you share your version of dieselEngineDyMFoam please...? Or working cases for this solver.. |
|
December 14, 2012, 13:18 |
|
#10 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
There are additional debug flags in the etc/controlDict file. As for moveDyMEngineMesh, remember that only the mesh is being changed, so its possible that the crash is ocurring after the mesh has been changed.
I don't have dieselDyMEngineFoam, but I was working on a sprayDyMFoam, which pretty much has the same changes that you need to make. Its posted on the Mantis site: http://www.openfoam.org/mantisbt/view.php?id=672 Good luck! |
|
December 17, 2012, 02:26 |
|
#11 |
Member
Anthony Nitski
Join Date: Aug 2009
Location: Earth
Posts: 35
Rep Power: 17 |
Thanks, Marco! I enable additional debug flags in etc/controlDict. There is tail of log output:
------------------------------------------------------------ polyTopoChanger::changeMesh ( const polyTopoChange& ref ) : completed topological change. void polyTopoChanger::update(const mapPolyMesh& m) : Updating mesh modifiers layerAdditionRemoval::updateMesh(const mapPolyMesh&) for object pistonLayer : Clearing addressing on external request. Pointers not set. void polyMesh::setInstance(const fileName& inst) : Resetting file instance to "22.93" void polyMesh::setMotionWriteOpt(IOobject::writeOption) Setting motion writeOpt to 0 void polyMesh::setTopoWriteOpt(IOobject::writeOption) Setting topo writeOpt to 0 Updating object pointMesh Updating object volPointInterpolation volPointInterpolation::makeWeights() : constructing weighting factors volPointInterpolation::makeWeights() : 1 volPointInterpolation::makeWeights() : 2 Floating point exception ------------------------------------------------------------ So, FPE generated in volPointInterpolation::makeWeights(), in following code (i think, divide by zero). May be an error in my case setup? Is it mesh related problem? ------------------------------------------------------------ if (debug) Info<< "volPointInterpolation::makeWeights() : 2" << endl; // Calculate inverse distances between cell centres and points // and store in weighting factor array forAll(points, pointi) { scalarList& pw = pointWeights_[pointi]; const labelList& pcp = pointCells[pointi]; forAll(pcp, pointCelli) { pw[pointCelli] = 1.0/mag(points[pointi] - cellCentres[pcp[pointCelli]]); sumWeights[pointi] += pw[pointCelli]; } } ------------------------------------------------------------ |
|
December 17, 2012, 13:21 |
|
#12 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
The divide by zero makes sense as far as where the error is ocurring. Not sure as to why, but most likely a mesh generation error. I can't remember the last time (or if ever) I tried layerAR on a sector mesh with periodic boundaries (it may be possible it doesn't work).
Could you make a simple flat piston mesh (use same angle for sector mesh) and try layerAR there with offset = 0? Then try it full cylinder with the same flat piston. Based on these tests we can figure out what the problem is. I'll see if I have an old cylinder mesh somewhere, but it may be faster for you to make your own. Also, please send me a picture of the faceZone that is being used to create the layers. Last edited by mturcios777; December 17, 2012 at 13:26. Reason: Additional question |
|
December 18, 2012, 23:37 |
|
#13 |
Member
Anthony Nitski
Join Date: Aug 2009
Location: Earth
Posts: 35
Rep Power: 17 |
Dear Marco,
I construct cylindrical mesh for 45 degree sector and full 3d without cyclic BC. Unfortunately, I got same errors. I enlarge the clearance and use zero offset. Here is pictures for last saved CA (23 degree). Piston patch looks equal pistonLayer faceZone... There is post by Abhishekd18 with the same error volPointInterpolation::makeWeights() : constructing weighting factors http://www.cfd-online.com/Forums/ope...ng-layers.html I guess, he used same "scania" case as I (by N. Nordin, without layerAR) and case conversion to 1.6 ext was not completed in right way... May you have a look on case files?? This error not only IC-related, Look at here http://www.cfd-online.com/Forums/ope...tml#post398179 Last edited by u22; December 19, 2012 at 02:36. |
|
December 19, 2012, 13:38 |
|
#14 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Thanks for the files, but your points file appears to be missing; can you double check your case and re-submit it?
|
|
August 11, 2014, 12:27 |
|
#17 | |
Member
sajad
Join Date: Aug 2013
Posts: 71
Rep Power: 13 |
Quote:
I wanna compile dieselEngineDyMFoam . plz help me how can I do it? best regards Sajad |
||
January 15, 2017, 04:14 |
|
#18 |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12 |
Hi,
I also met the same FPE problem after the first layer addition. Have you got a solution? |
|
March 24, 2017, 11:13 |
|
#19 | |
Senior Member
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12 |
Quote:
particle tracking & topo changes -> simulation crashes in 1.6-ext |
||
July 10, 2017, 03:22 |
|
#20 | |
New Member
Qiyan Zhou
Join Date: Sep 2016
Posts: 16
Rep Power: 10 |
Quote:
Hi u77 Since I post the message on the cfd online app, I cannot see you full name... sorry for calling you nickname... I read your post, and have several questions My layerAR can run smoothly with full cylinder simulation on foam-extend 4.0,and the results are acceptable. But you know, simulating the full cylinder is really costly, so I try to use the engine sector The boundary for two sides of the sector is cyclic Ggi (my combustion chamber geometry is a little complex, so cyclic is not suitable...) when define the cyclicGgi boundary conditions, the facezones of the two sides are needed. But after that, the layerAR will skip adding zones since there are already two facezones. As a result, the simulation will crash since no pointzone and pistonlayer zone have been defined. However, your post is a sector with layerAR, so I want to seek some advice from you about using layerAR with cyclicGgi boundary conditions Thanks in advance Sent from my iPhone using CFD Online Forum mobile app |
||
|
|