|
[Sponsors] |
May 31, 2012, 18:15 |
dynamicRefineFvMesh with mesh deformation
|
#1 |
New Member
Join Date: May 2012
Posts: 17
Rep Power: 14 |
Hello,
I am trying to set up a simulation where I combine mesh deformation with mesh refinement, but I cannot get it to work, and I'm wondering whether anyone could help. I made a local copy of the dynamicRefineFvMesh and added the following code at the beginning of the update routine, which should give the result that my simulation box is stretched periodically in the z direction: // Grid stretching and compression scalar oldTime = time().value() - time().deltaT().value(); scalar Time = time().value(); // Height of the cube at the old time scalar oldZ = startZ_ + amplitude_*( ::sin(constant::mathematical::twoPi*frequency_*old Time) ); // Height of the cube at the new time scalar Z = startZ_ + amplitude_*( ::sin(constant::mathematical::twoPi*frequency_* Time) ); Info<< "Mesh scaling. Time = " << time().value() << " Box height = " << Z << endl; pointField newPoints = points(); // Calculate where a grid point was relative to oldZ and multiply with Z to have // the same new relative position newPoints.replace ( vector::Z, points().component(vector::Z)*Z/oldZ ); // fvMesh::movePoints(newPoints); movePoints(newPoints); However, I get an error message: Cannot find surfaceScalarField meshPhi in user-provided flux mapping table and the code crashes with a floating point exception after a couple of iterations. Thanks, Arnout |
|
Tags |
deformation, dynamicrefinefvmesh, interdymfoam, meshphi |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] surface mesh merging problem | everest | ANSYS Meshing & Geometry | 44 | April 14, 2016 07:41 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Mesh motion with Translation & Rotation | Doginal | CFX | 2 | January 12, 2014 07:21 |
[ICEM] Problem making structured mesh on a surface | froztbear | ANSYS Meshing & Geometry | 4 | November 10, 2011 09:52 |
How to control Minximum mesh space? | hung | FLUENT | 7 | April 18, 2005 10:38 |