CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   map point Fields in dynamicRefineFvMesh (https://www.cfd-online.com/Forums/openfoam-solving/64555-map-point-fields-dynamicrefinefvmesh.html)

lukasfischer May 14, 2009 08:52

map point Fields in dynamicRefineFvMesh
 
We are trying to combine the mesh motion solvers (velocityLaplacian, ...) with dynamic mesh refinement in openfoam 1.5. All volVectorFields get correctly mapped to the refined mesh, but the pointMotionU or pointDisplacement Fields are omitted, so at the second timestep the motion solver complains about patch fields not corresponding to meshPoints.Field sizes.
What is the right way to include pointScalarFields and pointVectorFields in the mapping process?
Thanks, Lukas

deepsterblue May 14, 2009 21:52

Are you calling the updateMesh() routine in the motionSolver after refinement?

lukasfischer August 20, 2009 13:30

Yes, after refinement I am calling motionPtr_->updateMesh(map) but internal and boundary fields of pointMotionUx are not updated.

I also added
const pointMeshMapper m(pointMesh::New(*this), meshMap);
MapGeometricFields<scalar, pointPatchField, pointMeshMapper, pointMesh>(m);
in fvMesh::MapFields method which is invoked by updateMesh(map) of in the refine method.

If I call the pointMotionUx.boundaryField().updateCoeffs() after refinement
i get a SEG FAULT while calling patch().meshPoints() in pointPatchField::setInInternalField method.

Any suggestions what is wrong there?

regards
lukas

deepsterblue August 20, 2009 14:24

I tend to believe that the fvMotionSolvers are broken as far as topology changes are concerned. I would suggest that you try using the tetDecomposition motion solvers from the openFOAM-dev SVN. I have tested those with topology changes, and they work just fine.

sandy August 20, 2009 19:41

Quote:

Originally Posted by deepsterblue (Post 226987)
I tend to believe that the fvMotionSolvers are broken as far as topology changes are concerned. I would suggest that you try using the tetDecomposition motion solvers from the openFOAM-dev SVN. I have tested those with topology changes, and they work just fine.

Hi Sandeep, my version is OF-1.5, do you have some simple methods to call the solver from the OpenFOAM-dev or 1.6. SVN?

deepsterblue August 20, 2009 20:08

Not entirely sure what you mean. Are you talking about linking to the tetDecomposition motion solvers from the vanilla openCFD release? If so, I guess that's not possible.

I would suggest checking-out the existing OF-1.5-dev version. You can browse the repositories here:

http://openfoam-extend.svn.sourceforge.net/

The tutorials contain examples about linking to the motion solver.

sylvester June 25, 2010 09:04

Combine mesh motion with dynamic mesh refinement
 
Hi Lukas,

Were you able to combine mesh motion with dynamic mesh refinement?

I am trying this as well by combining the dynamicMotionSolverFvMesh and dynamicRefineFvMesh classes. Is this also what you did? I am not really getting anywhere and I would really appreciate some help on this.

regards,
Sylvester

Quote:

Originally Posted by lukasfischer (Post 216083)
We are trying to combine the mesh motion solvers (velocityLaplacian, ...) with dynamic mesh refinement in openfoam 1.5. All volVectorFields get correctly mapped to the refined mesh, but the pointMotionU or pointDisplacement Fields are omitted, so at the second timestep the motion solver complains about patch fields not corresponding to meshPoints.Field sizes.
What is the right way to include pointScalarFields and pointVectorFields in the mapping process?
Thanks, Lukas


lukasfischer June 28, 2010 08:14

No sorry, we tracked down the problem and I think we found out, that something like the interpolation of point fields between mesh changes is not implemented, tried to get it work by calculating the values with some functions that make a point field from a vol field, since they are updated correctly, but messed up somewhere... Maybe you will be more successful than we were, good luck!

sylvester June 28, 2010 12:42

Thanks. I'll see if I can make time to give it a go. It would be really nice to have this.

mm.abdollahzadeh October 26, 2012 10:06

Dear All

Could you give me your opinion on how to map field?

I am trying to add Mesh refinment to my code using multiDirRefinement.
The code is doing the refinment on newMesh which is at the begining the same as mesh .
then with changemesh the mesh is changed according to newMesh.

Code:

multiDirRefinement multiRef(newMesh, refCells, refineDict);
        polyTopoChange meshMod(newMesh);
      autoPtr<mapPolyMesh> morphMapPtr = meshMod.changeMesh(mesh, false, true);
      const mapPolyMesh& morphMap = morphMapPtr();

But I dont know how to map the feilds which have been calculated on the mesh ( not the newMesh) to the mesh which is changed.

Best
Mahdi


All times are GMT -4. The time now is 00:21.