CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Moving mesh

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

Like Tree4Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   June 21, 2006, 17:01
Default Hi, I've got some problems
  #21
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
lr103476 is on a distinguished road
Hi,

I've got some problems converting movingFlapFvMesh to OpenFOAM version 1.3. Before putting my compiler errors in this forum, I will ask you the following question:

Are there any fundamentally different changes in the way the mesh moves? If any, how is the easiest way to convert movingFlapFvMesh to the new version.

Regards,
Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   June 21, 2006, 17:33
Default There has been a bunch of name
  #22
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
There has been a bunch of name changes but without substantial algorithmic changes (e.g. various motion solvers are now run-time selectable + you can choose your diffusion model at run-time as well). On top of that, there is a new virtual base class for dynamicFvMeshes, called (obviously) dynamicFvMesh. If you wish to use the dynamic mesh top-level solvers which rely on the virtual base class.

Anyway, I'm not sure why you want to rewrite the moving flap example: should it not be enough to take the dynamicMotionSolverFvMesh and play around with the boundary conditions? If you use the oscillating fixed value boundary conditions you're 99% there; if you want a full 6-DOF solver kind of thing (this would include phase lags and independent frequency in each direction), only a small extension of the boundary condition is required.

In any case, the bulk of your job is already done in the dynamicMotionSolverFvMesh.

Hrv

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   June 22, 2006, 05:38
Default Allright. In version 1.2 I use
  #23
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
lr103476 is on a distinguished road
Allright. In version 1.2 I used the movingFlapFvMesh class to provide for the motion. Last week I moved to version 1.3, which involved some rewriting of my user apps. So for the motion I automatically took the old movingFlapFvMesh stuff.

I think you're right, modifying the boundary condition of the wing to make it oscillate should do the trick. Could you give a hint of where to start, which class do I have to copy (to my userapps) and modify for my needs.

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   June 26, 2006, 09:36
Default allright, I setup the case usi
  #24
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
lr103476 is on a distinguished road
allright, I setup the case using oscillatingFixedValue BC's, but nothing is moving though.

Right now I use for the wing wall the following settings for motionU:

wing_wall
{
type oscillatingFixedValue;
refValue uniform (1 0 0);
amplitude 1.0;
frequency 10.0;
}

And for U, I use:
wing_wall
{
type fixedValue;
value uniform (0 0 0);
}

What am I doing wrong?

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   June 26, 2006, 09:58
Default Easy: have a look at your flux
  #25
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
Easy: have a look at your flux file and you will see you've got a flux through the wall.

This is because you have specified the velocity to be zero in the absolute reference frame and the wall is moving: the real velocity is not zero.

Use the movingWallVelocity boundary condition on U and all will be well. This corrects the normal component of your velocity b.c. to allow you to specify the b.c. with respect to the moving reference frame of your wall.

Clever or what? :-)

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   June 26, 2006, 12:51
Default OK, I understand. But still no
  #26
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
lr103476 is on a distinguished road
OK, I understand. But still no motion occurs. The point is that I used the movingFlapFvMesh in previous simulations, but I am not familiar with this oscillatingFixedValue BC.

Now I have in the 0/motionU:
wing_wall
{
type oscillatingFixedValue;
refValue uniform (1 0 0);
amplitude 1.0;
frequency 10.0;
}

And for 0/U, I use:
wing_wall
{
type movingWallVelocity;
value uniform (0 0 0);
}

I use the standard icoDyMFoam solver. Still no motion occurs as can be seen from the output below. Nothing has to be solved for motionUx,y,z.

================================================
================================================

Mean and max Courant Numbers = 0.0230254 1.04542
deltaT = 0.007945
Time = 0.02055

Correct mesh motion diffusion field.
ICCG: Solving for motionUx, Initial residual = 0, Final residual = 0, No Iterations 0
ICCG: Solving for motionUy, Initial residual = 0, Final residual = 0, No Iterations 0
ICCG: Solving for motionUz, Initial residual = 0, Final residual = 0, No Iterations 0
ICCG: Solving for pcorr, Initial residual = 1, Final residual = 9.80538e-07, No Iterations 340
time step continuity errors : sum local = 4.59652e-14, global = -3.76461e-16, cumulative = -6.50917e-11
BICCG: Solving for Ux, Initial residual = 0.918317, Final residual = 1.91578e-06, No Iterations 2
BICCG: Solving for Uy, Initial residual = 0.0853413, Final residual = 1.68193e-06, No Iterations 2
ICCG: Solving for p, Initial residual = 0.00112938, Final residual = 9.66379e-07, No Iterations 237
time step continuity errors : sum local = 5.45017e-08, global = 2.95663e-10, cumulative = 2.30571e-10
ICCG: Solving for p, Initial residual = 0.00151305, Final residual = 9.19579e-07, No Iterations 203
time step continuity errors : sum local = 4.49651e-08, global = 8.32157e-11, cumulative = 3.13787e-10
ExecutionTime = 22.12 s ClockTime = 22 s

================================================
================================================

What do I wrong? Do I have to define the amplitude /frequency in the dynamicMeshDict, or so?


Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   June 26, 2006, 14:01
Default Sounds like a boundary conditi
  #27
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
Sounds like a boundary condition problem to me. Do you my any chance have a 2-D geometry with a symmetry plane front and back? Also, have a look at the motionU files in the time directories and see if the b.c. value changes.

I have changed the way oscillaing b.c. works for me so I cannot answer the detailed setup question. The fixed value is calculated by multiplying with the current scale as:

currentScale() const
{
return Foam::cos
(
2*mathematicalConstant::pi*frequency_*
this->db().time().value()
);
}

and

patchField = refValue_ + amplitude_*currentScale();

That all looks fine to me. In short, your b.c. looks OK, but you need to find out what else in the setup is stopping you from getting the motion.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   June 27, 2006, 04:11
Default I still have a 2D geometry wit
  #28
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
lr103476 is on a distinguished road
I still have a 2D geometry with two empty planes front and back. Also, the bc value does not change in the time directories.

Since I use the oscillatingFixedValue out-of-the-box I assume that the implementation is correct. I also copied some of the solver settings of the movingCone case, but still no motion.

Do I have to define "amplitude" and "frequency" in the 0/motionU or in a separate oscillatingDict file or something like that.

Is there anyone else working with this oscillatingFixedValue BC?

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   June 27, 2006, 07:08
Default OK, I have prepared a little e
  #29
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
OK, I have prepared a little example for you. Have a look at the movie:

http://powerlab.fsb.hr/ped/kturbo/Op...MeshMotion.mpg

The b.c. specification I am using is:

movingWall
{
type oscillatingFixedValue;
refValue uniform (0 0 0);
amplitude uniform (0 0.2 0);
frequency 2;
value uniform (0 0 0);
}

As you see, it works fine.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   June 27, 2006, 08:08
Default Forgot to say: if you want the
  #30
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
Forgot to say: if you want the case, please E-mail me. Also, there may be a mionr difference on how you specify the amplitude (mine is a vector, yours might be a scalar), but that's easily fixed. You can put a print statement into the scaling furction to see if it is being called and if it's calculated correctly.

Hrv
wxtwalkee likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   June 29, 2006, 04:02
Default I cant get your case moving. I
  #31
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
lr103476 is on a distinguished road
I cant get your case moving. It appears that you wrote an extra class, called solverLib, which is called in dynamicMeshDict.

I just replaced this line in dynamicMeshDict as shown below:

//solverLib "libtetDecompositionMotionSolver.so";
dynamicFvMeshLib "libtetDecompositionMotionSolvers.so";
dynamicFvMesh dynamicMotionSolverFvMesh;

twoDMotion yes;

solver laplaceTetDecomposition;

diffusion constant 1.0;

frozenDiffusion off;

distancePatches
(
movingWall
);

Furhter I initialised the U and p fields, such that I could use icoDyMFoam. Again no motion occurs. The motionU field is not updated in the new time directories.

Any ideas?

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   June 29, 2006, 06:54
Default Send me an E-mail and I'll giv
  #32
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
Send me an E-mail and I'll give you access to my development source - I think that's the easiest way forward.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   July 4, 2006, 12:54
Default Hello everybody, A Good day
  #33
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
Hello everybody,
A Good day to you all !

I use openFOAM 1.3, and have the need to do a moving mesh CFD analysis. I have been looking up the OpenFOAM forum, and noticed that there were many references to:

icoFoamAutoMotion

I dont seem to have this solver, and nor do I have the tutorial associated with it. I found "sonicFoamAutoMotion", but no "icoFoamAutoMotion".

Is there some way I can obtain this module?

Awaiting a reply!

Have a nice day!

Regards,

Philippose
philippose is offline   Reply With Quote

Old   July 5, 2006, 01:48
Default Hi Phillipose, as far as I
  #34
Senior Member
 
Jens Klostermann
Join Date: Mar 2009
Posts: 117
Rep Power: 8
jens_klostermann is on a distinguished road
Hi Phillipose,

as far as I know exists the icoFoamAutoMotion solver just until OF 1.2 .

Since OF 1.3 the solver for moving meshes is now called icoDyMFoam, see further information

http://www.opencfd.co.uk/openfoam/doc/ReleaseNotes-1.3

Regards Jens
jens_klostermann is offline   Reply With Quote

Old   July 5, 2006, 05:04
Default Hello Jens, Thank you very
  #35
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
Hello Jens,
Thank you very much for the information. I was wondering whether icoDyMFoam could be the same, because in the forums, I keep seeing Moving meshes referred to as "Dynamic meshes" too.

Shall try to use icoDyMFoam.

Have a nice day!

Regards,
Philippose
philippose is offline   Reply With Quote

Old   July 5, 2006, 06:47
Default Dear prof. Hrvoje, Using yo
  #36
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
lr103476 is on a distinguished road
Dear prof. Hrvoje,

Using your development code I am still not able to get your example (oscillatingCavityMesh) working. I assume that you probably also use some user libs.

Could you try to get your example working with the 'out-of-the-box' openFOAM 1.3? Is guess it should work.

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   July 5, 2006, 10:40
Default How do I access the currentSca
  #37
Senior Member
 
Frank Bos
Join Date: Mar 2009
Location: The Netherlands
Posts: 338
Rep Power: 9
lr103476 is on a distinguished road
How do I access the currentScale() function and the amplitude/frequency values from my solver source files?

Info << "var =" << oscillatingFixedValueFvPatchField::currentScale() << nl << endl;

Something like this?

Regards, Frank
__________________
Frank Bos
lr103476 is offline   Reply With Quote

Old   July 5, 2006, 12:19
Default Try: 1. Save the file in yo
  #38
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
Try:

1. Save the file in your home directory

run
tar xzf oscillatingCavityMesh.tgz
cd oscillatingCavityMesh
blockMesh $FOAM_RUN oscillatingCavityMesh
moveMesh $FOAM_RUN oscillatingCavityMesh
paraFoam $FOAM_RUN oscillatingCavityMesh


The animation is on the link above.

The file is attached. I am using my development version but I cannot recall any reason why this would not work. If you want my development sources, please let me know.

oscillatingCavityMesh.tgz

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   July 5, 2006, 12:35
Default Doh. Go to void oscillati
  #39
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
Doh. Go to

void oscillatingFixedValueFvPatchField<type>::updateCoe ffs() and do:

Info <<>currentScale() << endl;

Clear?

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   July 5, 2006, 12:37
Default That lot should say this -
  #40
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,763
Rep Power: 21
hjasak will become famous soon enough
That lot should say

this - > currentScale()

all together. Looks like the forum software is playing games with me.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply

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 Reference frame - UDF - Moving mesh modisa FLUENT 0 April 18, 2008 13:31
Moving Mesh & Not Rotating Mesh AB CD-adapco 1 October 25, 2004 03:10
moving mesh Jim CD-adapco 2 August 27, 2002 07:39
moving mesh zqf CD-adapco 1 June 19, 2002 01:30
moving mesh khb Main CFD Forum 1 June 5, 2002 10:46


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