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

Dynamic Mesh: solidBody mesh movement + controlled cell deformation

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2017, 11:10
Default Dynamic Mesh: solidBody mesh movement + controlled cell deformation
  #1
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 9
benchwell is on a distinguished road
Hi foamers,

I've been chewing on this problem for a few weeks now and while I feel it must be possible to solve, I haven't managed to do so myself.

Question:
Which configurations do I need for my dynamicMeshDict and pointDisplacement files to achieve a motion that allows for rotational and translational movement using an AMI-interface.

What I want to do (short):
Move a cellset within my domain while all of the mesh deformation happens outside of said cellset.

What I want to do (long):
The long term idea is to move a body that is enclosed in an AMI-sphere with multiple degrees of freedom. Therefore I'd like to have the AMI handle the rotation and be able to translate a defined cell region that encloses this sphere. See my sketch to get a clearer idea of what I'm trying to do.
Finally I'd like to perform virtual planar motion mechanism tests, a method where a body undergoes both oscillating translation and rotation, using pimpleDyMFoam. Therefore, I want to implement two movement patterns using dynamicMultiMotionSolverFvMesh.

What have I done so far?:
I'm running OpenFOAM v1612+ on Fedora25.
Currently I'm working on a 2D case of a cylinder with forced oscillation in crossflow, trying to reproduce the results of Placzek (2008) with the described method.

My idea is to move the cells within the AMI with the solidBody solver and move the AMI surfaces themselves with the same pattern, using one of the displacement solvers. The main problem of this approach seems to be that these solvers do not accept anything other than a wall to move.

Solvers I have tried:
  • displacementSBRStress: Will only work with walls, cannot move AMI-surfaces
  • displacementLaplacian: Same as SBRStress
  • solidBody: Moves Cellzone the way I want to, but does not apply deformation outside of cellzone
  • solidBodyDisplacementLaplacian: Moves the entire mesh, will not move AMI-surfaces

I have also tried my luck with dynamicMultiMotionSolverFvMesh, following the "relative Motion" tutorial but wasn't able to implement my idea. I have however managed to couple a translational movement (moving the whole domain vertically) and a rotational movement (rotating the AMI-cellset), which gives me hope.

Online-Search:
This question is similar to another one asked on cfd-online which has been unanswered so far.
That thread refers to the capsizing ship case in Jasak (2009), which is close to what I'm looking for.

Sketch:
Translation zone (grey): Vertical oscillation
Cell deformation zone (white): All deformation caused by translation is calculated in this area.
AMI: Rotation of cells that lie within, AMI surface must not be deformed by translation process.




Appendix
I attached the case I'm working with at the moment, with some of the ideas that I've tried commented out.
To run, just execute blockMesh and moveDynamicMesh -noFunctionObjects


Best regards,
Felix
Attached Files
File Type: gz cylinder.tar.gz (5.6 KB, 173 views)
File Type: pdf DynamicMeshProblem.pdf (7.4 KB, 387 views)
louisgag and jkampman like this.
benchwell is offline   Reply With Quote

Old   April 28, 2017, 09:48
Default Problem partly solved
  #2
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 9
benchwell is on a distinguished road
Hi everyone,

I have managed to implement the two coupled motions as described, with a new Problem emerging. I will update this thread accordingly soon, for all those interested .

In the meantime:
I can move an internal patch (created as baffle) through my domain, using the displacementLaplacian solver. However, it is not possible to move an internal face that is defined cyclic in constant/polyMesh/boundary.

This poses the following problem:
1). I cannot find a patch boundary condition that "ignores" the internal face and treats the two mesh parts on each side of said patch as connected.
2). When defining the internal face as cyclic, it cannot be moved using the displacement solvers.

How do I fix this?

Regards,
Felix
benchwell is offline   Reply With Quote

Old   July 26, 2017, 07:49
Default Any update?
  #3
New Member
 
Tom M
Join Date: Nov 2010
Posts: 3
Rep Power: 15
tommo97 is on a distinguished road
Hi everyone

Felix - I have a very similar problem and have just stumbled upon this thread. Did you ever manage to get the system working as required? If possible, could you describe how you managed to get as far as you described in the second post?

Kind regards

Tom
tommo97 is offline   Reply With Quote

Old   July 26, 2017, 08:27
Default Re: Any update?
  #4
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 9
benchwell is on a distinguished road
Hi Tom,

I found two different solutions, both achieving what I wished for (I never got to write a proper blog entry for it... maybe your interest will get me motivated again).

1. Method:
As initially planned, I introduce a superposition of two mesh movements:
- The AMI-sphere with the body inside is moved via the tabulated6DoFMotion solver
- To achieve rigid translation of the translation zone and deformation in the cell deformation zone the solver displacementInterpolation is used, which acts upon a faceZone defined with topoSet.

Code:
dynamicFvMesh       dynamicMultiMotionSolverFvMesh;
motionSolverLibs    ( "libfvMotionSolvers.so" );

// Solve multiple motions
dynamicMultiMotionSolverFvMeshCoeffs
{
    AMI_movement
    {
        solver solidBody;
        cellZone rotatableSphere;
        solidBodyCoeffs
        {
            solidBodyMotionFunction  multiMotion;

            solidBodyMotionFunction tabulated6DoFMotion;
            tabulated6DoFMotionCoeffs
            {
                    CofG            (0 0 0);
                    timeDataFileName "$FOAM_CASE/constant/tables/6DoFMotion.txt";
            }
        }
    }


    BOX_movement
    {
        solver displacementInterpolation;
        cellZone translationboxZone;

        displacementInterpolationCoeffs
        {
            interpolationTables
            (
                // The faceZoneSet
                (translationsurfaceZone     "pyTable")
            );
        }
    }

}
Both solvers use tables, that I created using python and are located in constant/tables/ (displacementInterpolation will look there). I found a bug in the displacementInterpolation solver that occurs with mesh of certain dimensions (will report bug report).

2. Method:
Using OpenFOAM-v1706's Overset Grid with the tabulated6DoFMotion makes a lot of stuff much easier
benchwell is offline   Reply With Quote

Old   July 26, 2017, 08:29
Default Re: Any update?
  #5
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 9
benchwell is on a distinguished road
Created a double reply by accident ...
benchwell is offline   Reply With Quote

Old   July 26, 2017, 09:38
Default Re: Any update?
  #6
New Member
 
Tom M
Join Date: Nov 2010
Posts: 3
Rep Power: 15
tommo97 is on a distinguished road
Hi Felix

Thanks for that!

Do you think that instead of using tabulated values one could use the 6DOF motion solver to calculate the forcing to move the AMI region (subject to appropriate constraints)?

Without wanting to short-circuit a pending blog post, I don't suppose you have an update version of the cylinder.tar.gz with the functioning example in it which you'd be happy to post?

Kind regards

Tom
tommo97 is offline   Reply With Quote

Old   August 1, 2017, 07:24
Default
  #7
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 9
benchwell is on a distinguished road
Hi Tom,

sorry for the late reply, I've been away for a couple of days.

It is possible using the 6 DoF motion solver in connection with AMI interpolation.
I've done so some time ago, but only with rotation.
This is achieved by defining the mesh deformation distance to be outside the mesh.

Code:
dynamicFvMesh     dynamicMotionSolverFvMesh;

motionSolverLibs ("libsixDoFRigidBodyMotion.so");

solver            sixDoFRigidBodyMotion;


displacementLaplacianCoeffs
{
    diffusivity         inverseDistance 1 ("main");
}

sixDoFRigidBodyMotionCoeffs
{
    // Moving patch within AMI
    patches         (main);

    // Distance relative to patch where mesh deformation is 
    // applied. Set high values to treat cells within AMI as solid

    innerDistance   1e5;
    outerDistance   1.1e5;

    // Kinematic properties
    mass            1;
    centreOfMass    (0 0 0);
Adding translational degrees of freedom will surely be more difficult since both AMI patches will have to move in sync.

I'll try and get a working cylinder example uploaded within the next few days.
mhasif02 and jkampman like this.
benchwell is offline   Reply With Quote

Old   August 9, 2017, 13:31
Default working example case
  #8
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 9
benchwell is on a distinguished road
Hey Tom and everyone interested,

here's the working example case.
Sorry for taking so long.

Best,
Felix
Attached Files
File Type: gz twomotioncylinder.tar.gz (171.3 KB, 415 views)
mhasif02, jie.chen and jkampman like this.
benchwell is offline   Reply With Quote

Old   December 7, 2017, 02:19
Default v1706's Overset
  #9
New Member
 
jingyuanli
Join Date: Nov 2017
Posts: 4
Rep Power: 8
beishannmuyu is on a distinguished road
hi Felix
you said "Using OpenFOAM-v1706's Overset Grid with the tabulated6DoFMotion makes a lot of stuff much easier",and I'm very interesting.
Can you show a case that an object moves in a straight line in the water by 1706v version.
thanks
beishannmuyu is offline   Reply With Quote

Old   June 14, 2018, 23:07
Default
  #10
New Member
 
marco polo
Join Date: Dec 2014
Posts: 2
Rep Power: 0
isrmar10 is on a distinguished road
Hi Felix
I am working in similar problem. I am using your final example case but I got an error which says

Cannot find cellZone name AMIcylinderZone. Valid zones are 0()

How can I solve this?

Regards,
Thank you,
Marco Polo
isrmar10 is offline   Reply With Quote

Old   February 7, 2019, 06:16
Default
  #11
New Member
 
Joris Kampman
Join Date: Nov 2018
Location: Hengelo, The Netherlands
Posts: 4
Rep Power: 8
jkampman is on a distinguished road
thanks, I'd been having the same problem for days (where the AMI patches are not movable (that would same some time, but this might be for future versions).



I'd noticed that this dynamicMultiMotionSolverFvMesh solver is only available in the openfoam.com versions and not the org ones? if so, I'll have to go through the gruesome process of trying to install the other fork.



In addition, could you tell me which version you are using?


thanks again, and kind regards
jkampman is offline   Reply With Quote

Old   February 7, 2019, 07:45
Default
  #12
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 9
benchwell is on a distinguished road
As I posted the problem and presented the solution, I was using OpenFOAM-v1612 (openfoam.com), I am now using OF-v1812.


For dynamic mesh cases, I find the openfoam.com development very interesting.



Why do you call the process gruesome? If you have done it once, compiling another version should be no problem.


Best regards,
Felix
jkampman likes this.
benchwell is offline   Reply With Quote

Old   February 7, 2019, 09:54
Default
  #13
New Member
 
Joris Kampman
Join Date: Nov 2018
Location: Hengelo, The Netherlands
Posts: 4
Rep Power: 8
jkampman is on a distinguished road
When I started foaming 4 months ago, I had the choice between .org and the .com versions. I hadn't investigated a whole lot into the difference between both, but indeed I've found the dynamics of the .com versions better and more advanced. For the 'static' stuff, I've used the .org version 6, which is fine.



It is however not generally common to state the version/fork of the tutorials found. In addition, the topology-changing dynamics have apparently been removed after having been present before in the .org versions. For a layman those things frustrate stuff a little.


The gruesome-ness comes from the fact that I've got to compile the stuff from source on linux and this is never very easy (I could not get the docker-stuff to work properly with external disks). I've however managed though, and even the paraFoam functionality seems to work. Nothing standing in the way anymore



Thanks again for this nice thread which finally helped me a lot. I expect to have some results soon. I hope to write a wiki-page on this (even though it is only for my own future work)...


kind regards
jkampman is offline   Reply With Quote

Old   February 8, 2019, 12:33
Default
  #14
New Member
 
Joris Kampman
Join Date: Nov 2018
Location: Hengelo, The Netherlands
Posts: 4
Rep Power: 8
jkampman is on a distinguished road
Hello Felix,

You stated:

Quote:
... located in constant/tables/ (displacementInterpolation will look there). I found a bug in the displacementInterpolation solver that occurs with mesh of certain dimensions (will report bug report) ...
I have encountered a weird problem with the following message which might be linked (hopefully not, but I'll ask you anyway) to the bug you've found.

I've obtained the error message:
Quote:
--> FOAM FATAL ERROR
Did not find point (-14.086 -25.969 -0.5) coordinate -25.969 in ranges 4(-25.969 -4.0785 8.13068 30.0211)
The error message is weird since it is a value right on the edge. Do you have any suggestions or ideas what's going on?

As you see, the 2D domain is quite large, hence my trigger on your comment on the dimensions

UPDATE:

I've confirmed that my error appears to be due to a bug which I suspect is the same as the one you've found.

The error occured with the mesh scaling (parameter convertToMeters in my mesh generating file blockMeshDict) set to 1.0. This causes the error given above.

However, for values 0.001 < convertToMeters < 0.5 no error occurs and the function moveDynamicMesh runs perfectly. I've attached the animated GIF with the moving mesh to this message below.

Note that this was the only change made; everything else stayed exactly the same.


@benchwell: I'm at this point not certain if - and even how - to file a bug report.



kind regards,


joris
Attached Images
File Type: gif passing_airfoil_very_small.gif (153.2 KB, 253 views)

Last edited by jkampman; February 12, 2019 at 09:19. Reason: new insights in dimension bug
jkampman is offline   Reply With Quote

Old   February 10, 2019, 16:02
Default
  #15
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by benchwell View Post
As I posted the problem and presented the solution, I was using OpenFOAM-v1612 (openfoam.com), I am now using OF-v1812.


For dynamic mesh cases, I find the openfoam.com development very interesting.



Why do you call the process gruesome? If you have done it once, compiling another version should be no problem.


Best regards,
Felix

Dear Felix,


I am trying to run your case, but I think you have forgotten to include "createBafflesDict" file and instead you have included "createPatchDict" in the system directory. Am I right?
I ran the case but didn't see any Multi-Motion.


P.S: I use OpenFOAM 1812 and I changed the case accordingly.


Cheers,
Mojtaba
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   October 9, 2019, 00:42
Default
  #16
New Member
 
moweijie
Join Date: Apr 2019
Posts: 4
Rep Power: 7
mowei is on a distinguished road
Hi everyone!
Thank you for helping me solving a similar problem. There I have another question, in my case, the wing moves up and down, when I calculate the moment in the functions(controlDict), how do I set the CofR, should I keep it a fixed value, or a changing value? Can anyone help me? Thank you!

Last edited by mowei; October 9, 2019 at 10:04.
mowei is offline   Reply With Quote

Old   June 2, 2020, 09:14
Default Similar issue
  #17
New Member
 
Conor
Join Date: Oct 2016
Posts: 14
Rep Power: 10
ConorMD is on a distinguished road
Hi everyone,

I have a similar task where I am using solidBody mesh movement and cell deformation. This time though, my cell deformation is happening within the solidbody. I am using a displacementLaplacian to model deflections on a rotating foil in a flow.

The problem I am having is that the displacementLaplacian is somehow shrinking the cellZone I am rotating to the point that the simulation fails (see image). The sim fails at the same point in time, regardless of the timestep size.

When the displacementLaplacian is disabled, the sim runs fine. So it appears the definition of my solidBody movement is ok. It appears to be in issue when combining the two solvers together.

Can anyone help me with this?
Thanks!

My dynamicMeshDict:
Code:
dynamicFvMesh  dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solvers
(




	Turbine
	{
		motionSolverLibs ("libfvMotionSolvers.so");
		solver solidBody;

		solidBodyCoeffs
		{
   		 	cellZone        rotorVolume;
    			solidBodyMotionFunction  rotatingMotion;
    			rotatingMotionCoeffs
    			{
     			 origin		(0 0 0);
      			 axis		(0 -1 0);
     		 	 omega       5.625;
   			}
		}
	}

	Foil
	{
		motionSolverLibs ("libfvMotionSolvers.so");
		solver displacementLaplacian;
		//cellzone morphZone;
		

		displacementLaplacianCoeffs 
		{

   		diffusivity quadratic inverseDistance (foil1);

		}
	}

);
Attached Images
File Type: jpg 1.jpg (24.1 KB, 173 views)
ConorMD is offline   Reply With Quote

Old   July 13, 2020, 01:58
Default
  #18
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by ConorMD View Post
Hi everyone,

I have a similar task where I am using solidBody mesh movement and cell deformation. This time though, my cell deformation is happening within the solidbody. I am using a displacementLaplacian to model deflections on a rotating foil in a flow.

The problem I am having is that the displacementLaplacian is somehow shrinking the cellZone I am rotating to the point that the simulation fails (see image). The sim fails at the same point in time, regardless of the timestep size.

When the displacementLaplacian is disabled, the sim runs fine. So it appears the definition of my solidBody movement is ok. It appears to be in issue when combining the two solvers together.

Can anyone help me with this?
Thanks!

My dynamicMeshDict:
Code:
dynamicFvMesh  dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
solvers
(




	Turbine
	{
		motionSolverLibs ("libfvMotionSolvers.so");
		solver solidBody;

		solidBodyCoeffs
		{
   		 	cellZone        rotorVolume;
    			solidBodyMotionFunction  rotatingMotion;
    			rotatingMotionCoeffs
    			{
     			 origin		(0 0 0);
      			 axis		(0 -1 0);
     		 	 omega       5.625;
   			}
		}
	}

	Foil
	{
		motionSolverLibs ("libfvMotionSolvers.so");
		solver displacementLaplacian;
		//cellzone morphZone;
		

		displacementLaplacianCoeffs 
		{

   		diffusivity quadratic inverseDistance (foil1);

		}
	}

);

I have the same problem. The rotation distorts the mess two much. The two solvers just modify the displacement in sequence (superposition), so there is no way to hope Laplacian silver adjust the distorted mesh by rotation. I am seeking a remeshing tutorial (topoChangerFvMesh) in OpenFoam but cannot find anyone.
Michael@UW is offline   Reply With Quote

Old   July 13, 2020, 10:26
Default
  #19
New Member
 
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 9
benchwell is on a distinguished road
Hi Michael,


could you post an image, indicating the type of "mesh mess" / deformation that you are talking about?


Best regards,
Felix
benchwell is offline   Reply With Quote

Old   July 13, 2020, 11:40
Default
  #20
Senior Member
 
Join Date: Jan 2019
Posts: 125
Blog Entries: 1
Rep Power: 0
Michael@UW is on a distinguished road
Quote:
Originally Posted by benchwell View Post
Hi Michael,


could you post an image, indicating the type of "mesh mess" / deformation that you are talking about?


Best regards,
Felix
Hi Felix,

I am trying to model a moving outer boundary with two rotating valves inside. Please refer to the attached figure. The two valves are modeled as baffles.

method1.jpg

The dynamicMeshDict is set up as:
Code:
 dynamicFvMesh   dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

solver    velocityLaplacian;

diffusivity   inverseDistance 3(wall valve1 valve2);
I also tried the motionSolverList by invoking both multiSolidBodyMotionSolver and dyamicMotionSolverFvMesh. It seems multiSolidBodyMotionSolver displace the nodes (and their adjacent nodes) of the valves correctly, but it does not move further nodes. And velocityLaplacian moves the wall and internal nodes the way just as multiSolidBodyMotionSolver does not exist. That means, they just work independently without knowing each other (they are designed working this way, actually). Therefore, the valve nodes go inside some internal cells after some time steps.

method2.jpg
The dynamic mesh dictionary file looks like:
Code:
dynamicFvMesh   dynamicMotionSolverFvMesh;

solvers
(

	valves
	{
	 	solver multiSolidBodyMotionSolver;

		valve1
		{
		        solidBodyMotionFunction tabulated6DoFMotion;

				tabulated6DoFMotionCoeffs
				{
					CofG            ( 0 0.0002 0 );
					timeDataFileName   "$FOAM_CASE/constant/6DoF1.dat";
				}
		}

		valve2
		{	  
		        solidBodyMotionFunction tabulated6DoFMotion;

				tabulated6DoFMotionCoeffs
				{
					CofG            ( -0.001 0.0002 0 );
					timeDataFileName   "$FOAM_CASE/constant/boundaryData/6DoF2.dat";
				}
		}


	}

        movingWall
	{
		solver velocityLaplacian;
		motionSolverLibs ("libfvMotionSolvers.so");
                velocityLaplacianCoeffs
                {
	            //diffusivity  uniform;
                    diffusivity  inverseDistance 3 ( wall valve1 valve2 );
                }
	}

);
By the way, I use OpenFOAM-7.

I hope it is clearer for you to understand my problem. Please let me know if you need more information.

Thank you!
Michael
Michael@UW is offline   Reply With Quote

Reply


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
y+ = 1 boundary layer mesh with snappyHexMesh Arzed23 OpenFOAM Running, Solving & CFD 6 November 23, 2022 16:15
simulation flapper movement with mesh deformation in CFX sakalido CFX 11 January 27, 2014 15:28
Update of the variables after dynamic mesh motion. gtg258f OpenFOAM Programming & Development 9 January 18, 2014 11:08
Dynamic Mesh for Movement of Piston vigii Fluent UDF and Scheme Programming 0 November 18, 2013 07:43
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


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