|
[Sponsors] |
[Other] Add / remove cell layers (dynamic mesh) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 10, 2014, 02:44 |
Add / remove cell layers (dynamic mesh)
|
#1 |
New Member
Christoph Gradl
Join Date: Feb 2014
Posts: 18
Rep Power: 12 |
Hello!
I am a beginner in OpenFoam and would be very glad to get some additional information for my questions. I am studying dynamic mesh moving in OpenFoam. I want to add / remove mesh layers instead of changing the mesh size. I studied the movingConeTopo tutorial, but I am working with OpenFoam v.2.2, the tutorial was created with version 1.5. Can somebody send me a tutorial case for add / remove cell layers or give me an idea of what the case should look like. I tried: 1) set up a mesh with blockMesh Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.1; vertices ( (0 0 0) (1 0 0) (1 1 0) (0 1 0) (0 0 0.1) (1 0 0.1) (1 1 0.1) (0 1 0.1) ); blocks ( hex (0 1 2 3 4 5 6 7) (50 50 1) simpleGrading (1 1 1) ); edges ( ); boundary ( movingWall { type wall; faces ( (2 6 5 1) // right ); } fixedWalls { type wall; faces ( (1 5 4 0) // bottom (3 7 6 2) //top ); } inlet { type wall; faces ( (0 4 7 3) // left ); } frontAndBack { type empty; faces ( (0 3 2 1) (4 5 6 7) ); } ); mergePatchPairs ( ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM Extend Project: Open Source CFD | | \\ / O peration | Version: 1.6-ext | | \\ / A nd | Web: www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object dynamicMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // motionSolverLibs ( "libfvMotionSolvers.so" ); dynamicFvMesh movingConeTopoFvMesh; movingConeTopoFvMeshCoeffs { motionVelAmplitude (-1 0.0 0); motionVelPeriod 1e-6; leftEdge 0; leftObstacleEdge 0; rightObstacleEdge 0.1; left { minThickness 1e-4; maxThickness 1e-3; } right { minThickness 1e-4; maxThickness 1e-3; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object meshModifiers; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 1 ( right { type layerAdditionRemoval; faceZoneName mWallSet; minLayerThickness 0.00002; maxLayerThickness 0.00005; oldLayerThickness 0; active true; } left { type layerAdditionRemoval; faceZoneName minletSet; minLayerThickness 0.00002; maxLayerThickness 0.00005; oldLayerThickness 0; active false; } ) // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.2 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( // Heater { name heater; type cellSet; action new; source boxToCell; sourceInfo { box (0 0 0)(0.1 0.1 0.01); } } { name heater1; type cellZoneSet; action new; source setToCellZone; sourceInfo { set heater; // name of cellSet } } { name mWall; type faceSet; action new; source patchToFace; sourceInfo { name "movingWall"; } } { name mWall; type faceSet; action add; source cellToFace; sourceInfo { set heater; option all; } } { name mWallSet; type faceZoneSet; action new; source setToFaceZone; sourceInfo { faceSet mWall; } } { name minlet; type faceSet; action new; source patchToFace; sourceInfo { name "inlet"; } } { name minletSet; type faceZoneSet; action new; source setToFaceZone; sourceInfo { faceSet minlet; } } ); // ************************************************************************* // Code:
Create mesh for time = 0 Selecting dynamicFvMesh movingConeTopoFvMesh Initial time:0 Initial curMotionVel_:(-0 0 0) void movingConeTopoFvMesh::addZonesAndModifiers() : Zones and modifiers already present. Skipping. #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::faceZone::operator()() const at ??:? #4 Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(Foam::IOobject const&) at ??:? #5 Foam::dynamicFvMesh::addIOobjectConstructorToTable<Foam::movingConeTopoFvMesh>::New(Foam::IOobject const&) at ??:? #6 Foam::dynamicFvMesh::New(Foam::IOobject const&) at ??:? #7 at ??:? #8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #9 at ??:? Segmentation fault (core dumped) Best regards, Christoph |
|
June 2, 2014, 08:28 |
movingConeTopo tutorial
|
#2 |
New Member
Frank Whittle
Join Date: Aug 2010
Posts: 12
Rep Power: 16 |
Hi Christoph,
I've currently started looking into this topic as well. I would like to know if you've managed to get anything out of it. From what I've seen, the moving topo libraries have been marked redundant since 1.6 or 1.7 version and I did find a post from Prof. Jasak mentioniong the addLayer classes need to be implemented into whatever solver you're working on. For the moment I cannot even seem to find the movingConeTopo tutorial, I would really appreciate it if you could post the tutorial with layer addition Thanks. |
|
June 2, 2014, 10:36 |
|
#3 |
New Member
Christoph Gradl
Join Date: Feb 2014
Posts: 18
Rep Power: 12 |
Hi!
You might want to check out foam-extend-3.0 (http://www.extend-project.de/the-extend-project) . In foam-extend the movingConeTopo tutorial can be found. It works only in foam-extend, maybe you can port it to OF 2.3.0. The version of the library can be adapt to different setups by using the setSet command. When I have time, I want to try to implement the library in OF 2.3. Maybe we can stay in contact and exchange our results. Best regards, Christoph |
|
June 16, 2014, 08:23 |
|
#4 |
New Member
Frank Whittle
Join Date: Aug 2010
Posts: 12
Rep Power: 16 |
Hi Christoph,
Thanks for the reply and sorry I could couldn't get back to you earlier. I got Extends 3.0 installed and looked at the tutorial, finally. I am not sure where I'm heading with this because I'm trying to test out injection modelling and I might have to scrap the project if I don't progress within the next few weeks, otherwise I would also be interested in importing this to OpenFOAM 2+ I've attached an image from the tutorial I am working on, I'll try to post the tutorial when I have the computer with me. I'm trying to move the empty space from right to left, adding layers along the red line. This is supposed to signify an injector nozzle. The layer addition seems to work in a rectangular surface when the two thin mesh layers are defined as moving zones but not if I want it described as in the picutre with zone 1 moving and zone two being fixed, the patch between the two zones being my layer addition patch. Do you have any idea for this? Do you know if sliding interface can be combined with layer addition? Thanks, Ishan (P.S. used a fake name because of company policy while doing my thesis, and I cannot find the option to change it back ) |
|
June 20, 2014, 10:44 |
|
#5 |
New Member
Frank Whittle
Join Date: Aug 2010
Posts: 12
Rep Power: 16 |
basicWorking is movingConeTopo except for slight geometry modification.
fixedZone is the same as above where I have separated the movingZone into two parts. One that moves and one that is fixed, the moving layer is between these two sets and I would ideally like to produce the dynamic cell layer addition here. sample2Dcase is my actual 2D example, where the solid body needs to move away from the cylinder side while introducing dynamic cell layer addition. Is this even possible? (All of these were created with OpenFOAM extends project 3.0) |
|
November 5, 2014, 14:33 |
|
#6 |
New Member
Caro
Join Date: Jul 2014
Posts: 15
Rep Power: 12 |
Hi,
did you manage to do the cell layer addition? I'm trying to do something similar. Could you share how you did it? |
|
December 11, 2014, 06:26 |
|
#7 |
New Member
Frank Whittle
Join Date: Aug 2010
Posts: 12
Rep Power: 16 |
Unfortunately I couldn't go further than that.
|
|
September 7, 2017, 13:03 |
|
#8 |
New Member
Jue Wang
Join Date: Apr 2014
Posts: 23
Rep Power: 12 |
||
September 7, 2017, 15:27 |
|
#9 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
For movingCone, you should have a look at the source code for it in src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C
This moving mesh class is very specific and requires that the faces you want to remove/add lie in a specific x plane, and that you are only moving in the x plane. If you want to do custom layerAR, you will need to make your on mesh class. |
|
April 8, 2021, 05:08 |
Add/ remove cell layers
|
#10 |
Member
Michael Sukham
Join Date: Mar 2020
Location: India
Posts: 84
Rep Power: 6 |
Now I found that the moving cell is actually as it is and it is only that the cell in front will be added or deleted according to the min and max thickness provided in the dynamicMeshDict. Is there any other way to deform the moving cell as well? Since the movingcell is a part of the computational domain, wont it affect the solution?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface | Kryo | OpenFOAM Meshing & Mesh Conversion | 13 | February 17, 2022 08:34 |
[snappyHexMesh] Help with Snappy: no layers growing | GianF | OpenFOAM Meshing & Mesh Conversion | 2 | September 23, 2020 09:26 |
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! | divergence | OpenFOAM Meshing & Mesh Conversion | 0 | January 23, 2019 05:17 |
How to use "translation" in solidBodyMotionFunction in OpenFOAM | rupesh_w | OpenFOAM Running, Solving & CFD | 5 | August 16, 2016 05:27 |
dynamic mesh + inflation layers | Albino | FLUENT | 3 | May 15, 2014 14:59 |