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

dynamicRefineFvMesh with mesh deformation

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 31, 2012, 17:15
Default dynamicRefineFvMesh with mesh deformation
  #1
New Member
 
Join Date: May 2012
Posts: 17
Rep Power: 5
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
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 07:21
[ICEM] surface mesh merging problem everest ANSYS Meshing & Geometry 39 June 5, 2013 19:02
[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 09:38


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