Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

flow around a mast problem

Help
Scotty
2005-06-05
2013-04-09
  • Scotty
    Scotty
    2005-06-05

    Hello!
    I am a new user of openflower, and I am having problems
    understanding what I am doing wrong. Maybe you can help
    me ?
    When I run openflower, I get the following output:

    #---------------------------------
    ########################################################
    #                OpenFlower  V1.0 Alpha Release        #
    #  Free Open Source CFD Software                       #
    #  Copyright (C) 2004-2005 by OpenFlower Team          #
    http://sourceforge.net/projects/openflower/         #
    #  Licensed under the GNU GPL Version 2.               #
    ########################################################
    System composed of 1 Equations: eqn1
    - Mesh file          : roundmast.msh
    Finished reading 4 frontiers.
           * Number of frontier faces: 1636
           * Number of elements      : 1200
    Finding all faces in domain completed....

    >>> In file Octree.cpp[262] <<<
    Problem in octree: possibly two identical faces in two different leafs...
    Submit bug report at http://sourceforge.net/projects/openflower
    Or send an email to openflower@gmail.com
    OpenFlower_v1.0_bin_Linux: Octree.cpp:266: void Octree::searchDoubleFaces(MyVector<int>&, constMyVector<Face>&, const std::vector<int, std::allocator<int> >&): Assertion `0' failed.
    runit.sh: line 3:  5117 Aborted                 (core dumped) ~/openflower/OpenFlower_v1.0_bin_Linux roundmast.flw
    #----------------------------------

    I define a post oriented in the z direction of circular cross section. I want to calculate the flow around this post, with the flow in the x direction.
    Here is my geometry file:

    #----------------------

    // define a round mast with a box around it.
    //
    // units in metres ?

    // $Id$

    // height of mast
    H=5.0;
    // radius of mast
    R=0.1;

    nT=200;
    lc=0.15;
    // lc=0.05;

    // make this very course for debugging...
    lc = 1.0;

    // space of box around the object of interest
    dx=1.0;
    dy=1.0;
    dz=1.0;

    Point(1) = {0.0,0.0,0.0,lc};
    Point(2) = {0.0,R,0.0,lc};
    Point(3) = {R,0,0.0,lc};
    Point(4) = {-R,0,0.0,lc};
    Point(5) = {0,-R,0.0,lc};

    Circle(1) = {2,1,3};
    Circle(2) = {3,1,5};
    Circle(3) = {5,1,4};
    Circle(4) = {4,1,2};

    Line Loop(77) = {1,2,3,4};
    Plane Surface(78) = {77};

    Extrude Surface {78, {0.0,0.0,H}} { Recombine; Layers { {nT}, {9000}, {1} }; };

    //
    // bottom
    Physical Surface(73) = {78};
    // top
    Physical Surface(74) = {100};
    // mast walls
    Physical Surface(75) = {87,91,95,99};
    Physical Volume(76) = {9000};

    // define box
    t=H+dz;
    b=-dz;

    Point(100) = {+dx,-dy,b,lc};
    Point(101) = {+dx,+dy,b,lc};
    Point(102) = {+dx,+dy,t,lc};
    Point(103) = {+dx,-dy,t,lc};

    Line(200)  = {100,101};
    Line(201)  = {101,102};
    Line(202)  = {102,103};
    Line(203)  = {103,100};

    Line Loop(400)={200,201,202,203};
    Plane Surface(500)={400};

    Extrude Surface {500, {-2*dx,0.0,0,0}}{ Recombine; Layers { {nT}, {9001}, {1} }; };

    Physical Surface(900) = {500};

    #---------------------------

    Here is my flw file:

    #-------------------------------
    // input data for mast simulation
    //

    TimeBegin 0.0
    TimeEnd   0.1
    // MaxTimeSteps 200
    CFL 0.5

    Medium air313K {
       rho  1.13
       mu  0.0000191
       lambda  100.0267
       Cp  0.987
    }

    Algorithm AlgoNavierStokes { eqn1 }

    Mesh gmsh {
       file roundmast.msh
       frontiers {
          surface 73 top
          surface 74 bottom
          surface 75 walls
          surface 900 upwind
       }
    }

    Equation navier_stokes_incompressible eqn1 {
      Medium air313K

      // boundary conditions block
      boundary_condition wall walls  0. 0. 0.
      boundary_condition wall top    0. 0. 0.
      boundary_condition wall bottom 0. 0. 0.

      boundary_condition velocity upwind  0.01 0.0 0.0
      // boundary_condition velocity inlet  0. 0. 1.
      // boundary_condition pressure_outlet outlet   0.

      // operator diffusion
      // operator convection

      solver GMRES

    //  Initial_Condition File eqn1.save
      Initial_Condition Expr 0.01  0. 0.

    }

    // Post_Processing block
    post_processing {
      global gmsh eqn1.Velocity 0. 1000.0 1.
      global gmsh eqn1.Pressure 0. 1000.0 1.
      probe eqn1.Velocity 0. 1. 0.001 position 0.5 0.5 0.1
    }

    end

     
    • Hi Scotty,

      I am going to see what's wrong with your problem, and will give you a clue rapidly in this thread.

      See U soon,
      VortexFlow.

      PS : thank you for sending the .geo and .flw files! That's the right way to do it!

       
    • Hi,
      Well it did not work because the mesh you created had some problems ;-)
      First, the physical volume that you define must be the final volume defined by all its surfaces (which form the outer frontier, and the walls of the mast).
      In your geo file, the physical volume that you created only included the mast domain (which you didn't want in your computation: you wanted the outer domain).

      Here is a .geo file that creates a proper mesh, made of prisms.
      #################################################
      // define a round mast with a box around it.
      //
      // units in metres ?

      // $Id$

      // height of mast
      H=5.0;
      // radius of mast
      R=0.1;

      nT=20;
      nt=5;
      lc=0.2;
      lc2=0.04;

      // space of box around the object of interest
      dx=1.0;
      dy=1.0;
      dz=1.0;

      Point(1) = {0.0,0.0,0.0,lc2};
      Point(2) = {0.0,R,0.0,lc2};
      Point(3) = {R,0,0.0,lc2};
      Point(4) = {-R,0,0.0,lc2};
      Point(5) = {0,-R,0.0,lc2};

      Circle(1) = {2,1,3};
      Circle(2) = {3,1,5};
      Circle(3) = {5,1,4};
      Circle(4) = {4,1,2};

      // define box
      t=H+dz;
      b=-dz;

      Point(100) = {+dx,-dy,0.0,lc};
      Point(101) = {-dx,+dy,0.0,lc};
      Point(102) = {+dx,+dy,0.0,lc};
      Point(103) = {-dx,-dy,0.0,lc};

      Line(5) = {103,100};
      Line(6) = {100,102};
      Line(7) = {102,101};
      Line(8) = {101,103};
      Line Loop(9) = {7,8,5,6};
      Line Loop(10) = {2,3,4,1};
      Plane Surface(11) = {9,10};
      Extrude Surface {11, {0.0,0.0,H}}{ Recombine; Layers { {nT}, {10000}, {1}
      }; };

      Extrude Surface {53, {0.0,0.0,+dz}}{ Recombine; Layers { {nt}, {10000}, {1}}; };
      Extrude Surface {11, {0.0,0.0,-dz}}{ Recombine; Layers { {nt}, {10000}, {1} }; };
      Line Loop(54) = {19,20,17,18};
      Plane Surface(55) = {54};
      Plane Surface(56) = {10};
      Extrude Surface {55, {0.0,0.0,+dz}}{ Recombine; Layers { {nt}, {10000}, {1}}; };
      Extrude Surface {56, {0.0,0.0,-dz}}{ Recombine; Layers { {nt}, {10000}, {1} }; };

      // freeStream
      Physical Surface(900) = {70,28,112};
      // walls
      Physical Surface(901) = {56,40,44,48,52,55};
      // outlet
      Physical Surface(902) = {78,36,120};
      // farStream
      Physical Surface(904) = {95,159,137,181,32,74,116,24,108,66};

      Physical Volume (90001) = {10000};
      #################################

      Here is the FLW file which works with the above mesh file:
      ##########################################
      // input data for mast simulation
      // 

      TimeBegin 0.0
      TimeEnd 20.0
      // MaxTimeSteps 200
      CFL 0.1

      Medium air313K {
      rho 1.13
      mu 0.0000191
      lambda 100.0267
      Cp 0.987
      }

      Algorithm AlgoNavierStokes { eqn1 }

      Mesh gmsh {
      file mast_temp.msh
      frontiers {
      surface 900 freeStream
      surface 902 outlet
      surface 901 walls
      surface 904 farStream
      }
      }

      Equation navier_stokes_incompressible eqn1 {
      Medium air313K

      // boundary conditions block
      boundary_condition wall walls 0. 0. 0.
      boundary_condition velocity freeStream 0.01 0.0 0.0
      boundary_condition pressure_outlet outlet 0.
      boundary_condition wall farStream 0. 0. 0.

      // These two operators MUST be defined, otherwise it will crash!
      // (for the moment, there is no check to see if these were initialized or not...
      // it will be done in the next release)
      operator diffusion
      operator convection

      solver GMRES

      // Initial_Condition File eqn1.save
      Initial_Condition Expr 0.01 0. 0.

      }

      // Post_Processing block
      post_processing {
      global gmsh eqn1.Velocity 0. 1000.0 1.
      global gmsh eqn1.Pressure 0. 1000.0 1.
      probe eqn1.Velocity 0. 1. 0.001 position 0.5 0.5 0.1
      }

      end
      ##########################################

      I had to specify some "wall" boundary conditions (farStream frontier) because we can not provide an inlet velocity BC adjacent to a pressure outlet BC.

      Hope it helps!
      See U soon,
      VortexFlow.