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

Modelling a Released Gate

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2014, 21:44
Default Modelling a Released Gate
  #1
New Member
 
Join Date: Jul 2014
Posts: 4
Rep Power: 11
whk1992 is on a distinguished road
Hello everyone,

I have an issue related to modelling a gate being released. A screenshot of the setup is attached:



In the picture, you can see a flume with a "gate" in the middle. The gate obviously is holding water on the left side. The gate has pivot around its bottom and drop to the right. (Alright, I know the gate is really thick now; this is just a simple example that I created. Please bear with me.)

The setup is utilizing interDyMFoam in OpenFOAM 2.2.1. I ran a test without moving any mesh. Water holds in the flume without lowering the water level. So far so good.

To move the gate, I did some research online and found out dynamicMotionSolverfvMesh cound move meshes. I played with it for awhile and typed the following dynamicMeshDict:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh   dynamicMotionSolverFvMesh;

motionSolverLibs ("libfvMotionSolvers.so");

solver displacementLaplacian;
displacementLaplacianCoeffs{
    diffusivity  inverseDistance 1(movingWalls);
}
As far as I can tell, the code actually ran without syntax issues. Here's the catch: interDyMFoam stopped very quickly, because some of the elements were "overlapping". Below is a screenshot of what happened:



When the gate tilted right, elements near the top-right corner of the gate was being squeezed. On the screen output of interDyMFoam, the Courant number went to 50+. That's bad news.

I realized that elements must be added on the left side and removed on the right side of the gate. movingConeTopoFvMesh seems to be a good candidate, as it provides layerAdditionRemoval. Here are the files related:

dynamicMeshDict:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
motionSolverLibs ("libfvMotionSolvers.so");
dynamicFvMeshLibs 1("libtopoChangerFvMesh.so");
dynamicFvMesh   movingConeTopoFvMesh;




movingConeTopoFvMeshCoeffs
{
    motionVelAmplitude      (0.3 0 0);
    motionVelPeriod         10;

    leftEdge                0;
    leftObstacleEdge        1.375;
    rightObstacleEdge       1.625;

    // left
    // {
    //     minThickness        2e-4;
    //     maxThickness        5e-4;
    // }

    right
    {
        minThickness        1e-4;
        maxThickness        2e-4;
    }
}
// ************************************************************************* //
meshModifiers:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      meshModifiers;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

1
(
	right
	{
		type layerAdditionRemoval;
		faceZoneName movingWallsRightFaceSet;
		minLayerThickness 0.0001;
		maxLayerThickness 0.0002;
		oldLayerThickness 1;
		active on;
	}


	// left
	// {
	// 	type layerAdditionRemoval;
	// 	faceZoneName movingWallsLeftFaceZoneSet;
	// 	minLayerThickness 0.00002;
	// 	maxLayerThickness 0.00005;
	// 	oldLayerThickness 0;
	// 	active true;
	// }
);

// ************************************************************************* //
topoSetDict:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      topoSetDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

actions
(
    {
        name    movingWallsRightFaceSet;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name    movingWalls;
        }
    }
    {
        name    movingWallsRightFaceZoneSet;
        type    faceZoneSet;
        action  new;
        source  setToFaceZone;
        sourceInfo
        {
            faceSet     movingWallsRightFaceSet;
        }
    }
);

// ************************************************************************* //
To run the code, I did the following:
  1. blockMesh
  2. topoSet
  3. setFields
  4. interDyMFoam

Here's the errors on my screen:
Code:
$ interDyMFoam
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.2.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.2.1-57f3c3617a2d
Exec   : interDyMFoam
Date   : Aug 19 2014
Time   : 18:40:08
Host   : "n0537"
PID    : 21514
Case   : /gscratch/motley/hkwong92/OpenFOAM/myTsunamiCases/rotatingWall-movingConeTopoFvMesh
nProcs : 1
sigFpe : Floating point exception trapping - not supported on this platform
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

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&) in "/gscratch/motley/shared/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64IccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::sigHandler(int) in "/gscratch/motley/shared/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64IccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib64/libc.so.6"
#3  Foam::faceZone::operator()() const in "/gscratch/motley/shared/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64IccDPOpt/lib/libOpenFOAM.so"
#4  Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(Foam::IOobject const&) in "/gscratch/motley/shared/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64IccDPOpt/lib/libtopoChangerFvMesh.so"
#5  Foam::dynamicFvMesh::addIOobjectConstructorToTable<Foam::movingConeTopoFvMesh>::New(Foam::IOobject const&) in "/gscratch/motley/shared/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64IccDPOpt/lib/libtopoChangerFvMesh.so"
#6  Foam::dynamicFvMesh::New(Foam::IOobject const&) in "/gscratch/motley/shared/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64IccDPOpt/lib/libdynamicFvMesh.so"
#7  Foam::regIOobject::writeObject(Foam::IOstream::streamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/gscratch/motley/shared/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64IccDPOpt/bin/interDyMFoam"
#8  __libc_start_main in "/lib64/libc.so.6"
#9  Foam::regIOobject::writeObject(Foam::IOstream::streamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/gscratch/motley/shared/OpenFOAM/OpenFOAM-2.2.1/platforms/linux64IccDPOpt/bin/interDyMFoam"
Segmentation fault
Obviously, I did something wrong. I searched on google and see what's wrong with my code. I looked into this document: http://www.tfd.chalmers.se/~hani/kur...AM-rapport.pdf. Comparing my codes to Section 1.2.4 of the document, I don't see where the problem is. I attempted to find a tutorial online, but nothing showed up for Version 2.2.x. Those for OF 1.6 doesn't seem to work in my environment.


Any thoughts on how the gate can be dropped to the right? Thanks.
whk1992 is offline   Reply With Quote

Old   June 13, 2016, 05:21
Default
  #2
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
Hi, you probably solved it by now. But in case someone is interested: Use topology changing meshes, like movingConeTopoFvMesh for example like here: https://www.youtube.com/watch?v=Bw13GyFSiSc
or, if it is only about the release without details of flow around the gate, use bodyForces (acceleration force that makes your fluid in cells that lie within your gate move with the same velocity as that part of thne gate) you add into the momentum equation of your solver (You then have to compile your own solver then, but that's a good thing anyway).
vonboett 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
error message cuteapathy CFX 14 March 20, 2012 06:45
OpenFOAM 1.7.0 Released opencfd OpenFOAM Announcements from ESI-OpenCFD 1 May 26, 2011 03:09
OpenFOAM Version 1.6 Released opencfd OpenFOAM Announcements from ESI-OpenCFD 0 July 27, 2009 17:55
Advice on multi-phase flow modelling Martin Main CFD Forum 3 October 14, 2008 05:16
sluice gate by VOF Gian, S. CFX 1 September 27, 2006 23:08


All times are GMT -4. The time now is 16:44.