CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   MovingCone tutorial and icoDyMFoam with addingremoving mesh layers (https://www.cfd-online.com/Forums/openfoam-solving/58047-movingcone-tutorial-icodymfoam-addingremoving-mesh-layers.html)

idosil September 6, 2007 03:25

I would like to modify the mov
 
I would like to modify the movingCone tutorial to add/ remove mesh layers instead of changing mesh size. How do I do it? Is there an example, tutorial on setting dynamic mesh with topologic changes?
Where can I find info on using blockMesh to set sets and zones? I understand it is required in order to define topologic changes of the mesh.

Best regards, ido

hjasak September 6, 2007 11:19

Try this: http://www.cfd-o
 
Try this:

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif movingConeTopo.tgz .

You may need some of my bug fixes etc as well, but that will give you an idea of what the case should look like.

Enjoy,

Hrv

idosil September 8, 2007 09:11

Thanks Hrv, It worked fine
 
Thanks Hrv,

It worked fine after a few small modifications. Now I have to work to understand the magic. Is there a demo with all the optional arguments to dynamicMeshDict file?

Best regards, Ido

hjasak September 8, 2007 09:37

Actually, I am not too proud o
 
Actually, I am not too proud of that class and tutorial. There are much better and more flexible examples, either moving a user-defined box using the scaling or automatic mesh motion for more complex cases.

You should look at:

- dynamicBodyFvMesh
Automatic motion of the mesh around a moving body. A direction,
amplitude and frequency of translational motion and origin, axis,
amplitude and frequency of rotational motion must be specified.

- dynamicBoxFvMesh
Automatic simplified mesh motion for "box-in-mesh" cases. Here,
a direction of motion is defined, together with motion amplitude
and frequency. The domain is separated into three parts, where
the middle part moves accordign to the prescribed motion law.
Parts of the mesh before and after the obstacle are scaled.

- dynamicMotionSolverFvMesh
Dynamic FV mesh, where a motion solver is used to move the mesh.
The user specifies motion using the boundary condition on the
appropriate motion variable.

As for the parameters, the best things is to look at the constructor. I usually do not hide the parameters, but you never know http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Enjoy,

Hrv

idosil September 18, 2007 01:29

Boundary conditions for slidin
 
Boundary conditions for sliding interface

Dear Hrv,

I have been studying the various dynamic mesh solvers supplied with OpenFOAM. I am working now with movingValveLayersFvMesh and wrote a small test case for it (for icoDyMFoam solver). The model simulates a piston moving inside a cylinder, closing and outlet. The "insideSlider" patch boundary conditions should be wall (fixedValue (0 0 0)) where ever it is not attached to the "outsideSlider". Where they are attached it should be an internal boundary. When I set the boundary condition to fixedvalue it was so everywhere including where it is attached to the other patch. When I changed it to zeroGradient I get flow through the attaching zone but the velocity does not goes to zero on the "wall" zone. How can I get the required behavior?

Best regards, Ido

P.S. How does I attach a file to this post?

idosil September 18, 2007 01:35

Boundary conditions for slidin
 
Boundary conditions for sliding interface (with attachment)

Dear Hrv,

I have been studying the various dynamic mesh solvers supplied with OpenFOAM. I am working now with movingValveLayersFvMesh and wrote a small test case for it (for icoDyMFoam solver, see attached file). The model simulates a piston moving inside a cylinder, closing and outlet. The "insideSlider" patch boundary conditions should be wall (fixedValue (0 0 0)) where ever it is not attached to the "outsideSlider". Where they are attached it should be an internal boundary. When I set the boundary condition to fixedvalue it was so everywhere including where it is attached to the other patch. When I changed it to zeroGradient I get flow through the attaching zone but the velocity does not goes to zero on the "wall" zone. How can I get the required behavior?

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif movingValve.rar

Best regards, Ido

idosil September 18, 2007 10:01

Hi, I tested the model agai
 
Hi,

I tested the model again today with fixedValue boundary conditions on the sliding interfaces and it worked correctly.

Bye, Ido

hjasak September 18, 2007 17:44

Sorry, don't get it - can you
 
Sorry, don't get it - can you please confirm if this works OK or not. If there's trouble, I'll have a look (I've run it less than 2 weeks ago).

Hrv

idosil September 19, 2007 12:11

Hi Hrv, 1) your model movin
 
Hi Hrv,

1) your model movingConeTopo works fine.

2) I have looked around and made a model to study the dynamic mesh solver movingValveLayersFvMesh. At first I had problem with boundary conditions on the sliding faces but later have been able to resolve it. The case is given in the attached file http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif movingValve.tgz .

Bye, Ido

zhaolj98 August 5, 2008 03:12

Hi, I have a question about th
 
Hi, I have a question about the movingConeTopo tutorial. This tutorial adds/removes mesh layers instead of changing mesh size.

When the current cell layer thickness exteeds the maxThickness setted in the dynamicMeshDict, the new added cell layer thickness is fixed to the maxThickness?

Can I choose another thickness, for example, 0.8*maxThickness, to add the new cell layer? If can, how can I do it?

By the way, I am using the OF-1.4.1-dev.

Thanks.

ZHAO

ngj August 5, 2008 03:37

Hi Have you tried to play a
 
Hi

Have you tried to play around with the minThickness/maxThickness in

~/OpenFOAM/mekngj-1.4.1-dev/run/tutorials/icoDyMFoam/movingConeTopo/constant/dyn amicMeshDict

I suppose that is where you want to go.

/ Niels

hjasak August 5, 2008 04:16

You can use any thickness you
 
You can use any thickness you like. Just make sure that your motion and time-step are appropriate, so that you do not move for eg. 2 layer thicknesses in a single time-step.

Enjoy,

Hrv

zhaolj98 August 5, 2008 04:22

Hi, Niels. Maybe you did no
 
Hi, Niels.

Maybe you did not understand my question.

I know that the min/maxThickness parameters are setted in the movingConeTopo/constant/dyn amicMeshDict. But in the codes of OF-1.4.1-dev, where is the new added cell layer thickness fixed to this maxThickness of the dynamicMeshDict?

When the current cell layer thickness exteeds the maxThickness of dynamicMeshDict, can I fix the new cell layer thickness to be any multiples of maxThickness by modifing the codes?

Thanks.

ZHAO

zhaolj98 August 5, 2008 05:13

Hi, Hrvoje. Thanks for your re
 
Hi, Hrvoje. Thanks for your reply.

When the old master cell layer thickness exceeds the maxThickness, the new points are added. If the new points are added at the maxThickness away from the master zone points, a old slave cell layer whose thickness is equal to the maxThickness, and a new cell layer whose thickness is equal to (the old master layer thickness - maxThickness) will be created. If the old master cell layer thickness exceeds the maxThickness very slightly, the newly created layer may be very thin. The very thin cell layer is not good for the convergence.

However, if I fix the old slave cell layer thickness to be less than 0.8*maxThickness, the newly created layer thickness will be greater than 0.2*maxThickness, and will be not very thin. So, how can I introduce this 0.8 or any other value to the codes, so that a thin cell layer can be avoided neatly?

Thanks.

ZHAO

gmc_salta September 26, 2008 11:01

Dear Prof Jasak We was starti
 
Dear Prof Jasak
We was starting to work with dynamic mesh. We began with icoDyMFoam of tutorial and work fine, but we need refined mesh in some place our domain (transient problem) and not in moving mesh.
We look some discussion on forum. One of them indicate that exits improved version of icoDyMFoam.

We download of this site http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Core/Ope nFOAM-1.4.1-dev/applications/solvers/incompressible/
all files of solver icoDyMFoam (by HJasak). Then we tried to compiled them, with version OF1.4.1, and it give this message:

Making dependency list for source file icoDyMFoam.C
could not open file initTotalVolume.H for source file icoDyMFoam.C
could not open file checkTotalVolume.H for source file icoDyMFoam.C
SOURCE=icoDyMFoam.C ; g++ -m64 -Dlinux64 -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/foam/OpenFOAM/OpenFOAM-1.4.1/src/dynamicFvMesh/lnInclude -I/home/foam/OpenFOAM/OpenFOAM-1.4.1/src/dynamicMesh/lnInclude -I/home/foam/OpenFOAM/OpenFOAM-1.4.1/src/meshTools/lnInclude -I/home/foam/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/foam/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/icoDyMFoam.o
icoDyMFoam.C:45:32: error: initTotalVolume.H: No existe el fichero o el directorio
icoDyMFoam.C:56:37: error: checkTotalVolume.H: No existe el fichero o el directorio
make: *** [Make/linux64GccDPOpt/icoDyMFoam.o] Error 1

We search files initTotalVolume.H and checkTotalVolume.H, in home/usr/OpenFOAM/OpenFOAM-1.4.1 but no found them.
We copied checkTotalVolume.H of another solver (icoMeshMotionFoam) but we not sure that it's correct. Please, could you send us the correct files or indicated how to take them?
Thanks very much
Sonia and Ana

deepsterblue September 26, 2008 12:04

Ensure that you have the $(FOA
 
Ensure that you have the $(FOAM_SRC)/OpenFOAM/lnInclude directory added to your Make/options file. The files you're looking for exist there.

gmc_salta September 29, 2008 08:13

Hi, Sandeep Thank you for you
 
Hi, Sandeep
Thank you for your quick answer, our version OF-1.4.1, was updated at sep/07.
We look for the files and find them but we have another error,
>> cannot find -llduSolvers
Again search this file in

http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Core/Ope nFOAM-1.4.1-dev/src/

and we find all files that needed, we are compiled them now.

Regard and thank for your suggestion
Sonia y Ana

wops September 30, 2008 10:01

Hi, I start using openFoam le
 
Hi,
I start using openFoam less than a month ago, version 1.5 and I'm not very familiarized with it.

I try to run movingValve and movingConeTopo but it didn't work.
I wanted to know if I have to install something previously to running the case or what do I do wrong

I'm the only one with this problem?
Thanks, René

deepsterblue September 30, 2008 11:26

You have to be specific. Can y
 
You have to be specific. Can you post some output?

wops September 30, 2008 11:42

Ok, here are the outputs. S
 
Ok, here are the outputs.

Starting time loop

Courant Number mean: 0 max: 0
deltaT = 0.111111
Time = 0.111111

time:0.111111 curMotionVel_http://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif1.77987e-05 0 0) curLeft:-0.007 curRight:-0.0035
No topology change

Executing mesh motion

Attempt to return dictionary entry as a primitive

file: /home/wops/OpenFOAM/wops-1.5/run/movingConeTopo/system/fvSolution::U::preconditi oner from line 70 to line 70.

From function ITstream& primitiveEntry::stream() const
in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 83.

FOAM aborting

#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::IOerror::abort() in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::dictionaryEntry::stream() const in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#3 Foam::dictionary::lookup(Foam::word const&, bool) const in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#5 Foam::fvMatrix<foam::vector<double> >::solve(Foam::Istream&) in "/home/wops/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoDyMFoam"
#6 Foam::lduMatrix::solverPerformance Foam::solve<foam::vector<double> >(Foam::tmp<foam::fvmatrix<foam::vector<double> > > const&) in "/home/wops/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoDyMFoam"
#7 main in "/home/wops/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoDyMFoam"
#8 __libc_start_main in "/lib/i686/cmov/libc.so.6"
#9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/wops/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoDyMFoam"

thanks,

mahendra November 17, 2008 01:20

Dear Sandeep Hi !!! I was w
 
Dear Sandeep Hi !!!

I was wondering as to how to use the "icoDyMFoam", I want to try the mixerVessel2D case from MRFSimpleFoam to be solved by using icoDyMFoam. But I am not getting how to initiate the case??
Do you have any cases which explains how to use "dynamicMeshDict" and also how to download the cases form threads like this.

Regards,
Mahendra.

patriem January 20, 2009 15:12

Hello Community, to continu
 
Hello Community,

to continue the latest posts, i want to ask a final question concerning the mentionend topics:

- Can i run movingConeTopo from above under OF1.5 or OF1.4.1?

- If not, can i change/add files in that versions in order to run the file or do i have to install a dev-Version?

Thank you very much for a short info
Regards,
Patrick

patriem January 20, 2009 15:55

According to my last post, her
 
According to my last post, here the error messages when trying to start movingConeTopo (from the above)

in OF1.4.1:
--> FOAM FATAL IO ERROR : keyword laplacian(rAU,pcorr) is undefined in dictiona ry "/opt/OpenFOAM/caelinux-1.4.1/run/movingConeTopo/./system/fvSchemes::laplacia nSchemes"

file: /opt/OpenFOAM/caelinux-1.4.1/run/movingConeTopo/./system/fvSchemes::laplac ianSchemes from line 44 to line 47.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 146.




and in 1.5:
#0 Foam::error::printStack(Foam::-Ostream&) in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::IOerror::abort() in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::dictionaryEntry::stream() const in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#3 Foam::dictionary::lookup(Foam::word const&, bool) const in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/wops/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#5 Foam::fvMatrix<foam::vector<double> >::solve(Foam::Istream&) in "/home/wops/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoDyMFoam"
#6 Foam::lduMatrix::solverPerformance Foam::solve<foam::vector<double> >(Foam::tmp<foam::fvmatrix<foam::vector<double> > > const&) in "/home/wops/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoDyMFoam"
#7 main in "/home/wops/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoDyMFoam"
#8 __libc_start_main in "/lib/i686/cmov/libc.so.6"
#9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/wops/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoDyMFoam"

the same as rene payri. is there a simple possibility to modify one of these versions?

regards,
patrick

hjasak January 20, 2009 16:56

Under Question 1, the answer i
 
Under Question 1, the answer is No and No.

Under Question 2, the answer is yes, but it will hurt. In retro-fitting changes, you are on your own. It would be easier to simply compile a complete -dev source code.

Good luck,

Hrv

marico January 27, 2009 09:12

Hi, has anyone positive exp
 
Hi,

has anyone positive experience with using funkySetFields for setting displacement boundary conditions? For example the movement of a piston, depending on time...

Thanks for your help
Marco

norman1981 June 8, 2009 05:12

movingConeTopFvMesh in Z direction
 
5 Attachment(s)
Dear OpenFOAM users,

I modified the movingConeTopoFvMesh class and the movingConeTopo tutorial to make the cone moving in Z direction.
It seems that the tutorial run well in terms of mesh layer addition/removal because it behaves in the same way as the case moving in X direction.
The strange thing occurs on the pressure and velocity fields at the time step 7 and 8: here these quantities are really different comparing them between the two cases (see pictures), while they looks really similar in the rest of the simulation (see picture at time step 6 as ex).

Has someone an explanation about this behaviour?

I have also attached the blockMeshDict file and the modified movingConeTopoFvMesh class (movingPlungerTopoFvMesh).

Thank you

Regards

Norman

kilroy May 20, 2013 16:33

4 Attachment(s)
Hello,

I have just gone through the OpenFOAM's movingCone tutorial. I can see that, as the object moves to the right side, mesh on the right side is contracting and the mesh on the left side of the object is expanding. Please see the pictures attached (movingCone_initial.png and movingCone_last.png)

Attachment 21945

Attachment 21946


After that, I tried to apply the same principles to a ship traveling through calm water making a 45 degree angle with the stream. I want to make the ship move 4 times the length of the ship, but my run crashes a little bit after the start. I think that is because the distortion of the mesh. Please see the pictures attached (ship_initial and ship_last)

Attachment 21947

Attachment 21948


Do you know if there is a way to overcome that distortion problem? (Like updating and recreating the mesh in each step)

Thank you very much for your help in advance,

Kilroy

deep shekhawat September 11, 2013 00:40

Dear
Can you tell me how to couple pimpleDymfoam and solidDisplacementFoam for simulation of FSI problems. It will be very useful for me. Also, please tell me about other methods to solve FSI problems like cantilever in cross flow.
Thank You

khatereh June 29, 2015 14:47

please email me the movingValve.tgz file
 
hi,
i tried to download attached file,but it downloaded with UNK format!!!!!!!!!!
it dose not open in ubuntu:mad:
please email for me this file,:)
thanks alot
my mail:kh_akbarnezhad@yahoo.com
---------------------------------------------------------------------------------------------
Quote:

Originally Posted by idosil (Post 178140)
Hi Hrv,

1) your model movingConeTopo works fine.

2) I have looked around and made a model to study the dynamic mesh solver movingValveLayersFvMesh. At first I had problem with boundary conditions on the sliding faces but later have been able to resolve it. The case is given in the attached file http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif movingValve.tgz .

Bye, Ido


Botari May 3, 2016 12:38

REF: Hi Hrv, 1) your model movin

Dear Ido,

how can I get the attached file (movingValve.tgz)? I tried to download but the link give me a file named movingValve-5423.unk

Thank you,
Tiago

hamedhiv July 29, 2016 05:42

Quote:

Originally Posted by khatereh (Post 552607)
hi,
i tried to download attached file,but it downloaded with UNK format!!!!!!!!!!
it dose not open in ubuntu:mad:
please email for me this file,:)
thanks alot
my mail:kh_akbarnezhad@yahoo.com
---------------------------------------------------------------------------------------------

you can simply rename .unk file to .tgz


All times are GMT -4. The time now is 17:06.