|
[Sponsors] |
March 2, 2012, 18:18 |
engineMesh with layered addition removal
|
#1 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
I was browsing through the old extend/dev code and found there used to be a lot more code in the $FOAM_SRC/engine folder than there is in the current 2.1.x version. The engineTopoChangerMesh/layerAR looks like it could be really useful to do engine simulation so I decided to try and port/adapt it to 2.1.x as an engineMesh subclass.
I've uploaded my first attempt which requires a few changes to the files in engineMesh to compile and link properly. In the Make/files, add Code:
engineMesh/layeredEngineMeshAR.C [CODE] virtual bool deform() = 0; [CODE] And the function deform should be defined in all the other the subclasses (layeredEngineMesh, fvMotionSolverEngineMesh, etc). A simple one to use is Code:
bool deform() { this->move(); return false; } Code:
engineMesh layeredAR; . . . deformAngle 10; delta 1e-4; offSet 1e-4; piston { patch piston; coordinateSystem { origin (0 0 0); coordinateRotation { type axes; e1 (1 0 0); e2 (0 1 0); e3 (0 0 1); } } minLayer 1e-3; maxLayer 1e-2; } Code:
Courant Number mean: 0.000371093475 max: 0.00648838644 deltaT = 1.56621499e-06 Crank angle = 342.02585 CA-deg deltaZ = 8.26588501e-06 pistonLayerID: 0 Piston layering mode Cannot find point in pts1 matching point 0 coord:(0.000187666667 6.83333333e-05 0.000473727705) in pts0 when using tolerance 5.07608117e-08 Searching started from:0 in pts1 Compared coord:(0.000187689683 6.82700891e-05 0.000473727705) with difference to point 6.73022297e-08 . . . cyclicPolyPatch::order : Writing neighbour faces to OBJ file "/windows/D/dEFRectMeshLayerTest/side_half0_faces.obj" cyclicPolyPatch::order : Writing my faces to OBJ file "/windows/D/dEFRectMeshLayerTest/side_half1_faces.obj" cyclicPolyPatch::order : Dumping currently found cyclic match as lines between corresponding face centres to file "/windows/D/dEFRectMeshLayerTest/side_half1_faceCentres.obj" --> FOAM Serious Error : From function cyclicPolyPatch::order(const primitivePatch&, labelList&, labelList&) const in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 1383 Patch:side_half1 : Cannot match vectors to faces on both sides of patch Perhaps your faces do not match? The obj files written contain the current match. Continuing with incorrect face ordering from now on! --> FOAM FATAL ERROR: Not implemented From function cloud::autoMap(const mapPolyMesh&) in file fields/cloud/cloud.C at line 65. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/printStack.C:201 #1 Foam::error::abort() at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/error.C:249 #2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/errorManip.H:85 #3 Foam::cloud::autoMap(Foam::mapPolyMesh const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/fields/cloud/cloud.C:66 #4 Foam::mapClouds(Foam::objectRegistry const&, Foam::mapPolyMesh const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/mapClouds.H:52 #5 Foam::fvMesh::mapFields(Foam::mapPolyMesh const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/fvMesh/fvMesh.C:489 #6 Foam::fvMesh::updateMesh(Foam::mapPolyMesh const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/fvMesh/fvMesh.C:674 #7 Foam::polyTopoChanger::changeMesh(bool, bool, bool, bool) at ~/OpenFOAM/OpenFOAM-2.1.x/src/dynamicMesh/polyTopoChange/polyTopoChanger/polyTopoChanger.C:293 #8 Foam::layeredEngineMeshAR::deform() at ~/OpenFOAM/OpenFOAM-2.1.x/src/engine/engineMesh/layeredEngineMeshAR/layeredEngineMeshAR.C:257 #9 at ~/OpenFOAM/OpenFOAM-2.1.x/applications/solvers/combustion/myEngineFoam/myEngineFoam.C:93 #10 __libc_start_main in "/lib/libc.so.6" #11 at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/i386/elf/start.S:122 Aborted |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Boundary layer addition at corners with sHM | bouclette | OpenFOAM Meshing & Mesh Conversion | 6 | July 27, 2011 08:32 |
Modelling sound propagation through layered porous media | nkinar | Main CFD Forum | 0 | July 4, 2010 14:45 |
layer removal only- OpenFOAM-1.5-dev | phsieh2005 | OpenFOAM Running, Solving & CFD | 0 | July 2, 2010 05:57 |
How to use the engine solvers with layer addition and removal | francesco | OpenFOAM Running, Solving & CFD | 2 | March 19, 2009 03:29 |
UDF for heat addition and mass addition | Srikanth | FLUENT | 2 | September 20, 2006 19:12 |