CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

dynamicRefineFvMesh with mesh deformation

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2012, 18:15
Default dynamicRefineFvMesh with mesh deformation
  #1
New Member
 
Join Date: May 2012
Posts: 17
Rep Power: 13
boeleman is on a distinguished road
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
boeleman is offline   Reply With Quote

Reply

Tags
deformation, dynamicrefinefvmesh, interdymfoam, meshphi

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 05:18.