CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   MotionUy and DynamicMesh with OF14 (http://www.cfd-online.com/Forums/openfoam-solving/59580-motionuy-dynamicmesh-of14.html)

bfa July 9, 2007 08:04

Hello Community, I am tryin
 
Hello Community,

I am trying to use automatic mesh motion with component laplacian solver and uniform diffusivity (for inner point motion).
I need to apply a non-uniform boundary motion to one of my walls, therefore I read motionUy from the dictionary and calculate a location-dependent motion velocity in y-direction. So far so good: The new motionUy values are written to the time directories as
value non-uniform List<scalar>
But the executed motion is somehow always uniform. i.e. instead of morphing into a sinus kind of shape, the whole boundary moves upwards.
How can that be? Is there anything I have to change in the laplacian motion solver?

Any hints would be welcome, I could as well send my source snippets and pointMotionU/cellMotionU files if neccessary.

Regards
Bjoern

bfa July 9, 2007 09:35

Hello again, I think I found
 
Hello again,
I think I found a part of the problem:

In my application I read only cellMotionU, not pointMotionU with
volScalarField& cellMotionU =
const_cast<volscalarfield&>(objectRegistry::lookup Object<volscalarfield>("cellMo tionUy"));

then I update the cellMotion with
cellMotionU.boundaryField()[movingBottomID] ==
curMotionVel_ *
Foam::sin(5.0*M_PI*(boundaryPoints.component(vecto r::X)));

with curMotionVel_ being the amplitude of my motion dependant on simulation-time and boundaryPoints being a vectorField containing the face centres of my moving boundary. (As you can see, I want to describe a motion dependent on the x-coordinate).

When I now try to do the same with pointMotionU, namely
pointScalarField& ptMotionU =
const_cast<pointscalarfield&>(objectRegistry::look upObject<pointscalarfield>("po intMotionUy"));

I get loads of compilation errors concerning the datatype pointScalarField.

Any idea how to read the pointMotionUy values and change them similar to the cellMotionU? I thought the solver's volume-point-interpolator would do the trick for me, but I was wrong there.

Regards
Bjoern

bfa July 10, 2007 06:52

Hmm, looks like I'm talking to
 
Hmm, looks like I'm talking to myself mainly. But nevertheless I made some progress. i.e. I surrounded the problem and now make it lay down its weapons and give up.

I found out that changing the cellMotionU entry in the time directories is not sufficient, since the motionSolver (in my case laplacianFvMotionSolver) only reads the value from $CASE_ROOT/0 but never updates itself.
How can I tell the motionSolver to take the new (calculated) values for cellMotionU every timestep?

Thanks for your help,
Bjoern


All times are GMT -4. The time now is 10:37.