|
[Sponsors] |
Dynamic Mesh: solidBody mesh movement + controlled cell deformation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 13, 2020, 12:14 |
|
#21 |
New Member
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 10 |
Hi Michael,
it feels to me that your problem would deserve its own thread where you lay out the exact nature of your case and the various movements that you want to implement (a little drawing would help). If you can provide an exemplary case, I will happily have a look at it, too. Generally, solidBody techniques are best suited if you want to move an entire region of the mesh, as in an overset mesh or a region separated by an AMI. If you want to move a surface - as it appears to be the case with these valves -, rigidBody motion solvers are better suited, as they will move the surface and then solve for the mesh motion. |
|
July 13, 2020, 12:51 |
|
#22 |
Senior Member
|
Hi Felex,
Thank you for being willing to have a look at my case. I use some dirty code to generate the pointMotionU file for the moving boundary. And the case file is too big to upload. So It needs to be simplified. I'll upload it when it is done later. Best regards, Michael Edit: case file is attached. Problem description: The outer boundary is expanding, and a plate (baffle) is rotating inside. Please see dynamicMeshDict and pointMotionU for the movements. The file extension needs to change from 'gz' to 'tar', as the latter is not invalid to upload and I can not compress the folder under the size limitation. Sorry for the inconvenience. Last edited by Michael@UW; July 13, 2020 at 13:42. Reason: attachment added |
|
July 13, 2020, 13:52 |
|
#23 | |
Senior Member
|
Quote:
Overset is only available in ESI OpenFOAM, and I prefer model the value as a baffle for simplicity. I do not worry about the computational cost of remeshing the whole domain to solve the large displacement issue but do not know how to use topoChangerFvMesh. |
||
July 14, 2020, 15:13 |
|
#24 | |
Senior Member
|
Quote:
Can you explain more about method 2? I tried dynamicOversetFvMesh in OpenFOAM-1906. It is easy to make multiple solid body motion, but I do not know how to couple it with deformation. dynamicOversetFvMesh and dynamicMotionSolverFvMesh are at the same top level (dynamicFvMesh); it seems they cannot be nested or superimposed. I need to deform the domain and solid body motion at the same time. |
||
July 15, 2020, 03:13 |
|
#25 |
New Member
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 10 |
Hi Michael,
a bunch of questions seem to have piled up and I will start from the back: In my case back then, overset was a fitting solution as I wanted to combine translation with rotation a basically just reframed the problem so that I eliminated the mesh deformation entirely. However, I think that it's not entire impossible to combine the two. I had a look at your case and while I couldn't run it (lacking OpenFOAM-7 on my machine at the moment) there were a few things that I would propose to change:
|
|
July 15, 2020, 12:23 |
|
#26 | |
Senior Member
|
Quote:
Best regards, Michael |
||
July 15, 2020, 20:07 |
|
#27 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
Just one idea about using AMI or acutally ACMI without a full circle. Your problem seems to be related to this setup described here: https://openfoam.org/release/2-3-0/non-conforming-ami/
In your case the valve would rotate, but you do not need the full circular connection to the rest of the mesh like in the case above. You can specify other boundary conditions for the parts of the value which are not connected to the rest of the mesh, e. g. a wall. Actually, there are several videos on youtube demonstrating such setups: https://www.google.com/search?q=acmi...e=lnms&tbm=vid |
|
July 15, 2020, 22:04 |
|
#28 |
Senior Member
|
Hi Joachim,
Thanks for your idea! I have watched some of the videos but definitely I will watch more to get inspired. I believe AMI or ACMI is promising for rotation or large displacement. But I just cannot figure out how to configure the A(C)MIs to implement my idea: The two valves rotate at different speed to control the flow in a deforming chamber (problem sketch is attached). Any further ideas will be helpful to me. Best regards, Michael |
|
July 16, 2020, 05:46 |
|
#29 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
How do the valves rotate? In a plane normal to the drawning? So like a shutter wheel?
Is your case 2D or 3D? |
|
July 16, 2020, 07:27 |
It's not pretty, but a start
|
#30 |
New Member
Felix Weiler
Join Date: Nov 2016
Location: Bremen
Posts: 22
Rep Power: 10 |
Hi Michael,
please check the below files to indicate how to set up a motion using mesh deformation. This is rather dirty, but I hope it can illustrate the idea. 0/pointDisplacement Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class pointVectorField; location "0"; object pointDisplacement; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 0 0 0 0 0]; internalField uniform (0 0 0); boundaryField { // The boundaries are expanding outlet { type uniformFixedValue; uniformValue table ((0 (0 0 0)) (1 (1 0 0))); } inlet { type uniformFixedValue; uniformValue table ((0 (0 0 0)) (1 (-1 0 0))); } // Rotating -- see dynamicMeshDict plate { type angularOscillatingDisplacement; value (0 0 0.3925); axis (0 0 1); origin (10 4.5 0); angle0 0; amplitude 10; omega 0.3925; } // Other sides are deformed as well frontAndBack { // might work with empty, too, haven't checked type fixedNormalSlip; n (0 0 1); } tunnel { type fixedNormalSlip; n (0 1 0); } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1912 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs (fvMotionSolvers); motionSolver displacementSBRStress; //displacementLaplacian; //motionSolver velocityComponentLaplacian z; // diffusivity uniform; // diffusivity directional (1 200 0); // diffusivity motionDirectional (1 1000 0); // diffusivity file motionDiffusivity; diffusivity quadratic inverseDistance 1(plate); // ************************************************************************* // Code:
cellDisplacement { solver PCG; preconditioner DIC; tolerance 1e-08; relTol 0; } cellDisplacementFinal { solver PCG; preconditioner DIC; tolerance 1e-08; relTol 0; } |
|
July 16, 2020, 11:41 |
|
#31 |
Senior Member
|
Hi Felix,
Thanks for setting up the displacementSBRStress. I tried it earlier, but it did not behave as expected. Your configuration gives better results (see attached figure). displacementSBRStress can afford larger rotation than Laplacian solvers even though it fails finally. I will try this with my real case to see how much it improves the results. Best regards, Michael |
|
July 16, 2020, 11:50 |
|
#32 | |
Senior Member
|
Quote:
My case is 2D. The valves rotate in the plane. The rotation centers are located on the walls. Acutally, there are no pysical gap between the two valves. But I found the gap is nessary, otherwise the sharing node (intersection of the two valves) will rotate twice. That's another issue. The main issue is how to keep the mesh quality with large rotation angle (up to 90 degree) and deforming outer boundaries. Best regards, Michael |
||
July 17, 2020, 11:41 |
|
#33 |
Member
benoit paillard
Join Date: Mar 2010
Posts: 96
Rep Power: 16 |
Hi,
For very large deformation I'd suggest switching to SLERP, available in .org version. |
|
July 17, 2020, 13:18 |
interpolatingSolidBody
|
#34 | |
Senior Member
|
Quote:
Thanks for your reply. I just checked out this motion sovler. The mesh can have a large deformation without ill-distorted with SLERP. But I do not understand the parameters and the baffle does not move as I expected. I cannot find any tutorial in OpenFOAM-7. But I looked through a few threads and found you provided a very useful sample dynamicMeshDict to use this interpolatingSolidBody solver. Mesh deformation with SLERP interpolation Mesh deformation with SLERP interpolation Here is my dynamicMeshDict which is almost the same as the sample from you. Code:
ampli (0 0 10); omeg 12.0; dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); motionSolver interpolatingSolidBody; solidBodyMotionFunction oscillatingRotatingMotion; oscillatingRotatingMotionCoeffs { origin (10 4.5 0.05); axis (0 0 1); omega $omeg; amplitude $ampli; } patches (plate); CofG (10 5 0.05); innerDistance 0.1; outerDistance 5; Thank you! Michael // There is mistake in the sketch. The length of the plate is 1 not 10! |
||
July 20, 2020, 09:41 |
|
#35 |
Member
benoit paillard
Join Date: Mar 2010
Posts: 96
Rep Power: 16 |
Well something is wrong with the center of rotation so in that case I'd try changing the settings to understand how your dynamicMeshDict does not work as expected.
|
|
July 20, 2020, 19:58 |
|
#36 | |
Senior Member
|
Quote:
Thank you for your hints. You are right! I changed the CofG, it rotates as expected. I set the origin of oscillatingRotatingMotionCeffs to be (0 0 0) and CofG the rotation center. The orgin does affect the motion, but I do not understand how it does. Code:
ampli (0 0 10); omeg 1; dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); motionSolver interpolatingSolidBody; solidBodyMotionFunction oscillatingRotatingMotion; oscillatingRotatingMotionCoeffs { origin (0 0 0); // not the rotaion center (surprizing), but affects the motion axis (0 0 1); omega $omeg; amplitude $ampli; } patches (plate); CofG (10 4.5 0); //rotation center innerDistance 0.1; outerDistance 4; |
||
July 21, 2020, 12:11 |
|
#37 |
Senior Member
|
Is there a way to let "motionSolver interpolatingSolidBody" not move the points on some patches? It interplates all the points in the area between
innerDistance and outerDistance, even those on fixed walls. As can be seen in the figure attached. I only rotate the lower plate, but the bottom wall and part of the upper plate are displaced as well because they are located in the range of innerDistance and outerDistance. The bottom wall and upper plate should not be moved. This is the dynamicMeshDict using interpolatingSolidBody. Code:
ampli (0 0 90); omeg 0.314; dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solvers ( rigidBodyMovement1 { motionSolver interpolatingSolidBody; solidBodyMotionFunction oscillatingRotatingMotion; oscillatingRotatingMotionCoeffs { origin (0 0 0); axis (0 0 1); omega $omeg; amplitude (0 0 90); } patches (plate1_lower); CofG (10 0 0); innerDistance 0; outerDistance 5; } /* rigidBodyMovement2 { //solver multiSolidBodyMotionSolver; motionSolver interpolatingSolidBody; solidBodyMotionFunction oscillatingRotatingMotion; oscillatingRotatingMotionCoeffs { origin (0 0 0); axis (0 0 1); omega $omeg; amplitude (0 0 0); } patches (plate2_upper); CofG (10 10 0.05); innerDistance 0; outerDistance 4; } */ internalMovement { solver displacementLaplacian; motionSolverLibs ("libfvMotionSolvers.so"); displacementLaplacianCoeffs { diffusivity inverseDistance 2 ( inlet outlet ); } } ); |
|
October 27, 2020, 16:24 |
dynamicMesh time-dependent rotation
|
#38 | |
New Member
A P
Join Date: Feb 2020
Location: Indiana, USA
Posts: 10
Rep Power: 6 |
Quote:
I am running a multiphase case where I need to produce rotating motion for initial 5 seconds of my simulation. After omega I am adding datafile to stop rotation of container after 5 seconds while the simulation continues. But, the container keeps on rotating. I am attaching my dynamicMeshDict lines, it would be great if you could look at it. dynamicFvMesh dynamicMotionSolverFvMesh; motionSolver solidBody; solidBodyMotionFunction rotatingMotion; rotatingMotionCoeffs { axis (0 0 1); origin (0 0 0); omega 2; timeDataFileName "$FOAM_CASE/constant/time.dat"; } |
||
October 27, 2020, 16:58 |
|
#39 |
Senior Member
|
Hi prakashPra,
My understanding is that timeDataFileName does not work in your sub-dictionary rotatingMotionCoeffs. OpenFOAM does not read this entry timeDataFileName if you use "solidBodyMotionFunction rotatingMotion". You may want to use " solidBodyMotionFunction tabulated6DoFMotion" to impose a varying angular velocity. Michael |
|
November 1, 2020, 19:57 |
|
#40 |
New Member
A P
Join Date: Feb 2020
Location: Indiana, USA
Posts: 10
Rep Power: 6 |
Thanks Michael, that was helpful.
|
|
|
|
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 |