|
[Sponsors] |
[mesh manipulation] How to combine dynamic mesh and static mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 6, 2014, 23:28 |
How to combine dynamic mesh and static mesh
|
#1 |
New Member
Chen Yu
Join Date: Sep 2013
Posts: 19
Rep Power: 13 |
Is it possible to combine the dynamic mesh and static mesh in one simulation case?
I want to use dynamic mesh based on dynamicMotionSolverFvMesh according to the prescribed motion of boundary in one part of the computational domain. At the same time, static mesh are wanted in the other side part of the computational domain because I need to use porous material etc. over there. Is there any solution for my requirement? How shall I define dynamicMeshDict and blockMeshDict? If not possible, is there any alternatives for this problem? |
|
May 7, 2014, 15:10 |
|
#2 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
One possibility is to set the point motion diffusivity to zero in the region you don't want to move.
|
|
July 4, 2014, 00:45 |
|
#3 |
New Member
Chen Yu
Join Date: Sep 2013
Posts: 19
Rep Power: 13 |
||
July 4, 2014, 03:00 |
|
#4 |
New Member
Chen Yu
Join Date: Sep 2013
Posts: 19
Rep Power: 13 |
This is the setting I'm using right now, can you give suggestions how to change it?
dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver velocityLaplacian; velocityLaplacianCoeffs { diffusivity motionDirectional (10 10 0); } |
|
July 4, 2014, 13:24 |
|
#5 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
For all motionSolvers, you can change the diffusivity to "file", which is a surfaceScalarField in the constant directory that provides the face diffusivity. You will need to create this yourself. This is your only option if you are using velocityLaplacian.
If you are using displacement motion solvers, you can specify an additional "frozenPointsZone" that is the name of a pointZone for non-moving points. This is probably the easiest, but is restricted to displacement motion solvers. |
|
July 29, 2014, 04:58 |
|
#6 | |
New Member
Chen Yu
Join Date: Sep 2013
Posts: 19
Rep Power: 13 |
thanks for your reply
I have switched to displacement motion solvers, but still don't get how to define a frozenPointsZone as you suggested. Do you mean create a pointZone file in polymesh folder, and define the frozenPointsZone inside of it like /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class regIOobject; location "constant/polyMesh"; object pointZones; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 1 ( frozenPointsZone { type pointZone; pointLabels List<label> 83646 ( 48 49 50 51 ....... Or, do you mean create another file named frozenPointsZone under polymesh folder and define the points inside? Quote:
|
||
August 5, 2014, 15:14 |
|
#7 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
You should define the points as a pointZone with whatever name you want them to have, then add the keyword frozenPointsZone to your dynamicMeshDict with the name of pointZone you want frozen.
|
|
August 6, 2014, 03:46 |
|
#8 |
New Member
Chen Yu
Join Date: Sep 2013
Posts: 19
Rep Power: 13 |
Thanks you. However, I follow your instructions, but still cannot succeed.
The dynamicMeshDict file is FoamFile { version 2.0; format binary; class dictionary; location "constant"; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //dynamicFvMesh staticFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; displacementLaplacianCoeffs { diffusivity inverseDistance (inlet); } frozenPointsZone farfield; The pointZone file is FoamFile { version 2.0; format ascii; class regIOobject; location "constant/polyMesh"; object pointZones; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 1 ( farfield { type pointZone; pointLabels List<label> 83646 ( 48 49 50 51 52 53 ...... Any further suggestions? |
|
August 6, 2014, 13:13 |
|
#9 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
You need to put the frozenPointsZone inside the displacementLaplacianCoeffs, as that is where the solver is looking for it. Try that and let me know if there are any error messages.
|
|
August 7, 2014, 05:47 |
|
#10 |
New Member
Chen Yu
Join Date: Sep 2013
Posts: 19
Rep Power: 13 |
the interDyMFoam is still running as the frozenPointsZone has not been defined
|
|
August 7, 2014, 13:09 |
|
#11 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Sorry, I think I was unclear. Your dictionary should look like:
Code:
FoamFile { version 2.0; format binary; class dictionary; location "constant"; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //dynamicFvMesh staticFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; displacementLaplacianCoeffs { diffusivity inverseDistance (inlet); frozenPointsZone farfield; } |
|
August 8, 2014, 02:37 |
|
#12 | |
New Member
Chen Yu
Join Date: Sep 2013
Posts: 19
Rep Power: 13 |
I believe that is exactly what I have done
FoamFile { version 2.0; format binary; class dictionary; location "constant"; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //dynamicFvMesh staticFvMesh; dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; displacementLaplacianCoeffs { diffusivity inverseDistance (inlet); frozenPointsZone farfield; } The simulation runs smoothly, but the points hasn't been frozen. Quote:
|
||
August 8, 2014, 13:32 |
|
#13 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
That's odd. If you turn on the debug option for fvMotionSolvers in the global controlDict, you should get a message that re-states the motionsolver diffusivity and frozenPointsZone. Can you tell me what message you get with the debug option activated?
|
|
October 19, 2014, 00:14 |
|
#14 |
New Member
Wang Xiuting
Join Date: May 2014
Location: Tianjin,CHN
Posts: 4
Rep Power: 12 |
I did exactly as you have done, and the mesh points still moved. So I want know whether you have solved this problem.
Thank U. |
|
July 23, 2020, 15:32 |
|
#15 | |
Senior Member
|
Quote:
Hi mturcios777, I wonder if you have a case working with "frozenPointZone". I cannot find any cases in the tutorials folder. I have searched a few posts. It seems no one gets this option work. The source code shows it will not change the displacement if "frozenPointZone" exists in dynamicMeshDict, but the points still move. I confrim the fixed points desired in paraview and the existence of the file "constant/polyMesh/pointZones". The output has nothing to do with 'frozenPointZone" when the debug option is switched on as shown below: Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Overriding DebugSwitches according to controlDict dynamicMotionSolverFvMesh 2; fvMotionSolver (unregistered) Create mesh for time = 0 Selecting dynamicFvMesh dynamicOversetFvMesh Selecting motion solver: displacementLaplacian Applying solid body motion to entire mesh --> FOAM Warning : From const Foam::HashTable<Foam::List<int> >& Foam::polyBoundaryMesh::groupPatchIDs() const in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 510 Removed patchGroup 'wall' which clashes with patch 1 of the same name. Selecting motion diffusion: uniform Selecting motion solver: multiSolidBodyMotionSolver Applying solid body motion to entire mesh Selecting solid-body motion function tabulated6DoFMotion Applying solid body motion tabulated6DoFMotion to 564 points of cellZone movingZone1 PIMPLE: no residual control data found. Calculations will employ 10 corrector loops HTML Code:
motionSolverLibs ("libfvMotionSolvers.so"); solver displacementLaplacian; displacementLaplacianCoeffs //solver velocityLaplacian; //velocityLaplacianCoeffs { diffusivity uniform; //frozenDiffusion no; frozenPointsZone fixedPoints; } Anyone share your experience? Regards, Michael |
||
May 19, 2021, 09:33 |
how to setup frozenPointsZone with displacementLaplacian
|
#16 |
New Member
Victor Baconnet
Join Date: Apr 2021
Location: Cannes, France
Posts: 9
Rep Power: 5 |
Hello,
Might be a bit late, but maybe it can help somebody. In the case I am using, I have managed to use frozenPointsZone by doing the following: 1. Create a pointZone in your topoSetDict dictionary. As an example, mine looks like this: Code:
xsep 1.0; actions ( //First, define a pointSet { name fixedZonePointSet; type pointSet; action new; source boxToPoint; box ($xsep -1.0 -1.0) (30.0 1.0 3.0); } //Convert existing pointSet to pointZone. //This is the one you want to be using for your frozenPointsZone { name fixedZone; type pointZoneSet; action new; source setToPointZone; set fixedZonePointSet; } ); Code:
dynamicFvMesh dynamicMotionSolverFvMesh; motionSolverLibs (fvMotionSolvers); solver displacementLaplacian; displacementLaplacianCoeffs { diffusivity quadratic inverseDistance (leftwall); frozenPointsZone fixedZone; //Here! Make sure it's inside the brackets } $FOAM_SRC/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C At line 96, you can see the following code : Code:
frozenPointsZone_ ( coeffDict().found("frozenPointsZone") ? fvMesh_.pointZones().findZoneID ( coeffDict().get<word>("frozenPointsZone") ) : -1 ) Code:
if (debug) { Info<< "displacementLaplacianFvMotionSolver:" << nl << " diffusivity : " << diffusivityPtr_().type() << nl << " frozenPoints zone : " << frozenPointsZone_ << endl; } As an example, this is what it looks like for me, when my pointZone is correctly set up: Code:
Create time Create mesh for time = 0 Selecting dynamicFvMesh dynamicMotionSolverFvMesh Selecting motion solver: displacementLaplacian Applying solid body motion to entire mesh Selecting motion diffusion: exponential Selecting motion diffusion: inverseDistance Selecting patchDistMethod meshWave displacementLaplacianFvMotionSolver: diffusivity : quadratic frozenPoints zone : 1 Cheers, Victor |
|
April 21, 2022, 02:47 |
|
#17 | |
New Member
Ali
Join Date: May 2016
Location: Sydney, Australia
Posts: 19
Rep Power: 10 |
Quote:
|
||
October 25, 2023, 01:55 |
|
#18 |
Senior Member
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17 |
Do you know the debug switch name to be activated without the need to modify the code? I have generated the point zone but the points are still moved
Thanks a lot |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 18:16 |
udf for valve closing a pipe using dynamic mesh | chem engineer | Fluent UDF and Scheme Programming | 2 | May 13, 2017 10:39 |
Dynamic mesh is not getting updated. | cardio | FLUENT | 1 | May 20, 2014 09:41 |
How to know mesh size after dynamic refinement | tayo | OpenFOAM | 16 | May 22, 2013 14:39 |