Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

I need help getting this one to work

Help
2005-12-16
2013-04-09
  • Openflower seems to not read the mesh file. I really don't know what I'm doing, but I think this model should run. I trying to learn how to use it. I had a presentation from Fluent yesterday with their ICE heat sink problem solver. I had the Openflower software since a month ago, I just didn't invest time to figure it out until this morning. I first tried to export a Pro/e file to .STP and read it with GMSH, but when it filed and I opened the file, it looks like garbage. There is not one human readable part in it that I can sort of convert by hand. So I was stuck with learning to model with GMSH. Its not too hard. I Then tried some of the models with Openflower and I was impressed by what it can do. I tried my own model and ran many times trying to figure out the syntax. I spent hours searching for documentation on the net and got no where. Does anyone have a step by step explenation of how to use the software? It seems that the windows GUI will only set up diffusion problems. It would be nice if one could set up as much as possible and then hit save and come back another day. I find that I have to define everything or there is no go. I gave up on that and I started to look at the sample codes, and here I am with a file that I know should work, but doesn't. I have not done any other file but the bent tube example and so I cannot figure out this one my self. Another weird thing is that the program will also not solve any of the other samples either. this is what I get :

    ########################################################
    Simulation data file: heat_sink.flw
    System composed of 1 Equations: eqn1
    - Mesh file          : heat.msh
    Finished reading 5 frontiers.
           * Number of frontier faces: 0
           * Number of elements      : 0
    Finding all faces in domain completed....
    0 seconds elapsed for finding double faces with Octree
           * Number of faces         : 0
          -> Mesh file completed!
    0 seconds elapsed for Elements Octree creation
    Results of checkMesh:
    * Smallest Characteristic Mesh Length: 1e+030 m.
    * Total volume= 0 m3.
    * Total frontiers surface= 0 m2.
    * Frontiers surfaces:

    >>> In file src/Geometry/Mesh.cpp[332] <<<
    The frontier defined with name bottom does not exist in the mesh file!

    this is my geo file  from GMSH

    Point(1) = {0.0,0.0,0.0,0.1};
    Point(2) = {5,0.0,0.0,0.1};
    Point(3) = {0,3,0.0,0.1};
    Point(4) = {1,3,0.0,0.1};
    Point(5) = {2,3,0.0,0.1};
    Point(6) = {3,3,0.0,0.1};
    Point(7) = {4,3,0.0,0.1};
    Point(8) = {5,3,0.0,0.1};
    Point(9) = {1,1,0.0,0.1};
    Point(10) = {2,1,0.0,0.1};
    Point(11) = {3,1,0.0,0.1};
    Point(12) = {4,1,0.0,0.1};

    Point(13) = {0.0,0.0,8,0.1};
    Point(14) = {5,0.0,8,0.1};
    Point(15) = {0,3,8,0.1};
    Point(16) = {1,3,8,0.1};
    Point(17) = {2,3,8,0.1};
    Point(18) = {3,3,8,0.1};
    Point(19) = {4,3,8,0.1};
    Point(20) = {5,3,8,0.1};
    Point(21) = {1,1,8,0.1};
    Point(22) = {2,1,8,0.1};
    Point(23) = {3,1,8,0.1};
    Point(24) = {4,1,8,0.1};
    Line(1) = {2,14};
    Line(2) = {1,2};
    Line(3) = {1,13};
    Line(4) = {13,14};
    Line(5) = {2,8};
    Line(6) = {8,20};
    Line(7) = {20,14};
    Line(8) = {13,15};
    Line(9) = {15,22};
    Line(10) = {22,1};
    Delete {
      Line{9};
    }
    Delete {
      Line{10};
    }
    Line(10) = {15,3};
    Line(11) = {3,1};
    Line(12) = {3,4};
    Line(13) = {4,9};
    Line(14) = {9,10};
    Line(15) = {10,5};
    Line(16) = {5,6};
    Line(17) = {6,11};
    Line(18) = {11,12};
    Line(19) = {12,7};
    Line(20) = {7,8};
    Line(21) = {15,16};
    Line(22) = {16,21};
    Line(23) = {21,22};
    Line(24) = {22,17};
    Line(25) = {17,18};
    Line(26) = {18,23};
    Line(27) = {23,24};
    Line(28) = {24,19};
    Line(29) = {19,20};
    Line(30) = {7,19};
    Line(31) = {6,18};
    Line(32) = {12,24};
    Line(33) = {11,23};
    Line(34) = {10,22};
    Line(35) = {5,17};
    Line(36) = {4,16};
    Line(37) = {9,21};
    Line Loop(38) = {3,8,10,11};
    Plane Surface(39) = {38};
    Line Loop(40) = {4,-1,-2,3};
    Plane Surface(41) = {40};
    Line Loop(42) = {5,-20,-19,-18,-17,-16,-15,-14,-13,-12,11,2};
    Plane Surface(43) = {42};
    Line Loop(44) = {12,36,-21,10};
    Plane Surface(45) = {44};
    Line Loop(46) = {25,-31,-16,35};
    Plane Surface(47) = {46};
    Line Loop(48) = {13,37,-22,-36};
    Plane Surface(49) = {48};
    Line Loop(50) = {37,23,-34,-14};
    Plane Surface(51) = {50};
    Line Loop(52) = {34,24,-35,-15};
    Plane Surface(53) = {52};
    Line Loop(54) = {33,-26,-31,17};
    Plane Surface(55) = {54};
    Line Loop(56) = {33,27,-32,-18};
    Plane Surface(57) = {56};
    Line Loop(58) = {28,-30,-19,32};
    Plane Surface(59) = {58};
    Line Loop(60) = {29,-6,-20,30};
    Plane Surface(61) = {60};
    Line Loop(62) = {6,7,-1,5};
    Plane Surface(63) = {62};
    Line Loop(64) = {7,-4,8,21,22,23,24,25,26,27,28,29};
    Plane Surface(65) = {64};
    // bottom
    Physical Surface(70) = {41};
    // outlet1
    Physical Surface(71) = {61};
    // outlet2
    Physical Surface(72) = {47};
    // outlet3
    Physical Surface(73) = {45};
    // Walls
    Physical Surface(74) = {63,65,49,51,55,57,53,59,43,39};
    Surface Loop(75) = {63,61,-65,-41,-43,59,57,-55,47,53,51,-49,-45,39};
    Volume(76) = {75};

    this is my .flw

    // simple heat sink
    // temp demo

    TimeBegin 0
    TimeEnd 10
    MaxTimeSteps 50
    CFL 0.5

    Medium water
    {
      rho .5
      mu .001
      lambda 100
      Cp 1
    }

    Algorithm AlgoNavierStokes { eqn1 }

    Mesh gmsh
    {
      file heat.msh
      frontiers
      {
        surface 70 bottom
        surface 71 outlet1
        surface 72 outlet2
        surface 73 outlet3
        surface 74 walls
      }
    }

    Equation navier_stokes_incompressible eqn1
    {
    Medium water

    // initial conditions
      boundary_condition wall walls 0. 0. 0.
      boundary_condition velocity bottom 0.5 2. -1.0
      boundary_condition pressure_outlet outlet1 0.
      boundary_condition pressure_outlet outlet1 0.
      boundary_condition pressure_outlet outlet1 0.

      operator diffusion
      operator convection

        solver GMRES

    //  Initial_Condition File eqn1.save
      Initial_Condition Expr 0. 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,

      Well here are your FLW and GEO files debugged!

      First the .FLW:
      - You had an error in declaring BCs: you forgot to declare outlet2 and outlet3.
      - When assigning a value to a property, you must write 0.xxx (eg. "0.56"), and not .xxx (eg. ".56").

      For the .GEO:
      - When you have such simple geometries, but may want to refine near corners, you can use prisms instead of tetrahedrals: solution will be much nicer!
      - Your .geo file was not correct, because you forgot to declare the Physical Volume related to the computational domain. Therefore, no element was saved in the .msh file (only physical elements will be in the .msh file : physical surfaces -frontiers- and physical volumes -computational domain). You must declare your physical volume by hand in the .geo file.

      - heat_sink.geo:

      // Begin
      lc = 0.3;
      nT = 12;

      Point(1) = {0.0,0.0,0.0,lc};
      Point(2) = {5,0.0,0.0,lc};
      Point(3) = {0,3,0.0,lc};
      Point(4) = {1,3,0.0,lc};
      Point(5) = {2,3,0.0,lc};
      Point(6) = {3,3,0.0,lc};
      Point(7) = {4,3,0.0,lc};
      Point(8) = {5,3,0.0,lc};
      Point(9) = {1,1,0.0,lc};
      Point(10) = {2,1,0.0,lc};
      Point(11) = {3,1,0.0,lc};
      Point(12) = {4,1,0.0,lc};

      Line(1) = {1,2};
      Line(2) = {2,8};
      Line(3) = {8,7};
      Line(4) = {7,12};
      Line(5) = {12,11};
      Line(6) = {11,6};
      Line(7) = {6,5};
      Line(8) = {5,10};
      Line(9) = {10,9};
      Line(10) = {9,4};
      Line(11) = {4,3};
      Line(12) = {3,1};
      Line Loop(13) = {11,12,1,2,3,4,5,6,7,8,9,10};
      Plane Surface(14) = {13};

      Extrude Surface {14, {0.0,0.0,8.0}} { Recombine; Layers { {nT}, {9000}, {1} }; };

      // bottom
      Physical Surface(70) = {39};
      // outlet1
      Physical Surface(71) = {31};
      // outlet2
      Physical Surface(72) = {63};
      // outlet3
      Physical Surface(73) = {47};
      // Walls
      Physical Surface(74) = {35,75,71,67,59,55,51,43,76,14};
      Physical Volume(100) = {9000};

      // end .geo file

      - heat_sink.flw:
      // simple heat sink
      // temp demo

      TimeBegin 0
      TimeEnd 10
      MaxTimeSteps 50
      CFL 0.5

      Medium water
      {
        rho 0.5
        mu 0.001
      }

      Algorithm AlgoNavierStokes { eqn1 }

      Mesh gmsh
      {
        file heat_sink.msh
        frontiers
        {
          surface 70 bottom
          surface 71 outlet1
          surface 72 outlet2
          surface 73 outlet3
          surface 74 walls
        }
      }

      Equation navier_stokes_incompressible eqn1
      {
      Medium water

      // boundary conditions
        boundary_condition wall walls 0. 0. 0.
      // Should'nt it be something like: boundary_condition velocity bottom 0.0 2. 0.0
      //  boundary_condition velocity bottom 0.5 2. -1.0
      boundary_condition velocity bottom 0.0 2. 0.0
      // Here you forgot to define outlet2 and outlet3 :
        boundary_condition pressure_outlet outlet1 0.
        boundary_condition pressure_outlet outlet2 0.
        boundary_condition pressure_outlet outlet3 0.

        operator diffusion
        operator convection

          solver GMRES

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

        }

      // Post_Processing block
      post_processing
        {
        global gmsh eqn1.Velocity 0. 10.0 0.1
        global gmsh eqn1.Pressure 0. 10.0 0.1
        probe eqn1.Velocity 0. 10. 0.001 position 0.5 0.5 0.1
        }
      end

      Good luck,
      Vortexflow.

       
    • You can find at the following page

      http://sourceforge.net/project/screenshots.php?group_id=104134&ssid=23741

      an illustration of your application using OpenFlower I just ran with a few (!) lesser points than your initial mesh.

      Bye,
      VortexFlow.

       
    • very cool. so I was that close to figuring it out!  At the end of the day I figured that I needed physical surfaces for gruping all the wall surfaces together. I'm working of a another test at home right now. This time on a slower 1.9gig computer as oposed to a 3gig computer at work. the diff is that I run linux at home.. I notice it goes much faster.

      My name is Alfonso Medina. I work for ISEcorp. I'm designing an ultracapasitor enclosure and I wanted to use CFD to asure my self that this was a workable thing. We are going to contract a professional to do this. However, This Open flower this is exciting and it will be very useful for preliminary designs. I hate designing in the blind. Normally we only care about material strength and so we run Pro/mechanica. Its a slooow wastful and buggy code from hell.

      well, I'll see if I can get this one to work using the physical volume and the other tips. If not, I'll post it and see if you can help. Then I'll study it to see what went wrong.

      I was impressed to see the little picture when I loged on the site. Thanks!

      ON that let me ask you a question: It was supposed to be a heat sink with 3 fins. I just wanted the code to do something so I used the navier stoks eqn from an example. Can the code be used to say give a temperature on the botom, define an air space on the top and see how much cooling occurs or what temperatures are seen on the fins?

      Alfonso Medina

       
    • aomedina
      aomedina
      2005-12-18

      OK I finally got one to work. I'll work on getting an open office document on how to set up a simple problem. You can correct it as you see fit and post it on here.

      I see now that I can make my own geometry then assign physical surfaces with Gmsh and physical volume by for example

      Surface Loop(127) = {110,108,-90,-94,102,104,86,123,-82,-106,-32,30,-24,26,-28,114,112,-66,-62,-70,-116,34,-74,-125,22,20};
      Volume(128) = {127};
      //volume
      Physical Volume (129) = {128};

      but where does this come from??
      Extrude Surface {6, {0.0,0.0,5.0}}
        { Recombine; Layers { {nT}, {9000}, {T} }; };
      Physical Volume(76) = {9000};

      at the begining of the file you define the global characteristic length CL and then you have T and nT what are those?

      I downloaded the source code too. Very organized. I don't know C++ but I can follow what the code is doing since its a bit readable. I see that there is a kernel and a set of equations and a set BC definitions. Very nice.

      I hope your project explodes with gui programers at some point, so I can use it at home for my experiments. That way programing retards like me can use the tool in less than a day of looking at text files.

      For some reason Pro/e STL files can't be opened by gmsh, but I figured that I can save them as .obj then open them with Blender and then save them as stl and open them in gmsh for meshing. I must say that the gmsh cad tool is not too bad either. It helps to keep it simple and keep track of what you are doing.

      thanks

      Alfonso

       
    • Hi Alfonso,
      Well, at the moment, no temperature transport equation is coded in OpenFlower, but it is not that hard to do: I hope I can code it in the next few months (when I have some time...). Therefore: no, we can not make heat transfer computations using OpenFlower.

      Concerning gmsh: yes it is a very powerful/helpful free soft. That's why a chose to interface it with OpenFlower!
      Well, "nT" is just a constant defined at the beginning os the file, just like "lc". It is used to specify how many layers of extrusion are done for creating the z-direction mesh.
      The script:
      Extrude Surface {6, {0.0,0.0,5.0}} { Recombine; Layers { {nT}, {9000}, {1} }; };
      is just taken from the examples given with gmsh. It was added "by hand" in the .geo, as I don't know how to do it with the interface.

      Hope it helps.
      See U soon,
      Alexandre Chatelain, aka VortexFlow.

       
    • not to be a pain in the neck, but could you tell me what is wrong with this one?

      ########################################################
      Simulation data file: ise_v.flw
      System composed of 1 Equations: eqn1
      - Mesh file          : ise_v.msh
      Finished reading 4 frontiers.
             * Number of frontier faces: 3352
             * Number of elements      : 8973
      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: Octree.cpp:266: void Octree::searchDoubleFaces(MyVector<int>&, const MyVector<Face>&, const std::vector<int, std::allocator<int> >&): Assertion `0' failed.
      Aborted

      lc = 1.1;
      //Mesh.CharacteristicLengthFactor = 4;
      Point(1) = {0, 0, 0, lc};
      Point(2) = {2, 0, 0, lc};
      Point(3) = {0, 22, 0, lc};
      Point(4) = {8, 29, 0, lc};
      Point(5) = {29, 29, 0, lc};
      Point(6) = {29, 20, 0, lc};
      Point(7) = {2, 20, 0, lc};
      Point(8) = {15, 20, 0, lc};
      Point(9) = {17, 20, 0, lc};
      Point(10) = {15, 0, 0, lc};
      Point(11) = {17, 0, 0, lc};
      Point(12) = {0, 0, 41, lc};
      Point(13) = {2, 0, 41, lc};
      Point(17) = {2, 20, 41, lc};
      Point(21) = {15, 20, 41, lc};
      Point(25) = {15, 0, 41, lc};
      Point(29) = {17, 0, 41, lc};
      Point(33) = {17, 20, 41, lc};
      Point(37) = {29, 20, 41, lc};
      Point(41) = {29, 29, 41, lc};
      Point(45) = {8, 29, 41, lc};
      Point(49) = {0, 22, 41, lc};
      Line (1) = {1, 2};
      Line (2) = {1, 3};
      Line (3) = {2, 7};
      Line (4) = {3, 4};
      Line (5) = {7, 8};
      Line (6) = {8, 10};
      Line (7) = {10, 11};
      Line (8) = {11, 9};
      Line (9) = {9, 6};
      Line (10) = {6, 5};
      Line (11) = {5, 4};
      Line (15) = {12, 13};
      Line (16) = {13, 17};
      Line (17) = {17, 21};
      Line (18) = {21, 25};
      Line (19) = {25, 29};
      Line (20) = {29, 33};
      Line (21) = {33, 37};
      Line (22) = {37, 41};
      Line (23) = {41, 45};
      Line (24) = {45, 49};
      Line (25) = {49, 12};
      Line (27) = {1, 12};
      Line (28) = {2, 13};
      Line (32) = {7, 17};
      Line (36) = {8, 21};
      Line (40) = {10, 25};
      Line (44) = {11, 29};
      Line (48) = {9, 33};
      Line (52) = {6, 37};
      Line (56) = {5, 41};
      Line (60) = {4, 45};
      Line (64) = {3, 49};
      Line Loop (1000013) = {1, 3, 5, 6, 7, 8, 9, 10, 11, -4, -2};
      Plane Surface (13) = {1000013};
      Line Loop (1000029) = {1, 28, -15, -27};
      Ruled Surface (29) = {1000029};
      Line Loop (1000033) = {3, 32, -16, -28};
      Ruled Surface (33) = {1000033};
      Line Loop (1000037) = {5, 36, -17, -32};
      Ruled Surface (37) = {1000037};
      Line Loop (1000041) = {6, 40, -18, -36};
      Ruled Surface (41) = {1000041};
      Line Loop (1000045) = {7, 44, -19, -40};
      Ruled Surface (45) = {1000045};
      Line Loop (1000049) = {8, 48, -20, -44};
      Ruled Surface (49) = {1000049};
      Line Loop (1000053) = {9, 52, -21, -48};
      Ruled Surface (53) = {1000053};
      Line Loop (1000057) = {10, 56, -22, -52};
      Ruled Surface (57) = {1000057};
      Line Loop (1000061) = {11, 60, -23, -56};
      Ruled Surface (61) = {1000061};
      Line Loop (1000065) = {-4, 64, -24, -60};
      Ruled Surface (65) = {1000065};
      Line Loop (1000069) = {-2, 27, -25, -64};
      Ruled Surface (69) = {1000069};
      Line Loop (1000070) = {15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
      Plane Surface (70) = {1000070};
      Surface Loop (1000001) = {13, 70, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69};
      Volume (1) = {1000001};
      //inlet_1
      Physical Surface(124) = {29};
      //inlet_2
      Physical Surface(125) = {45};
      //outlet_2
      Physical Surface(126) = {65};
      //volume
      Physical Volume (127) = {1};
      //walls
      Physical Surface(128) = {57,61,70,13,69,33,41,49,53,37,41};

      // INPUT DATA FILE for testing OpenFlower.
      // Created on 09/12/2004.

      TimeBegin 0.
      TimeEnd 15.
      MaxTimeSteps 60
      CFL 0.5

      Medium water
      {
      rho    1.
      mu     0.001
      }

      Algorithm AlgoNavierStokes { eqn1 }

      Mesh gmsh
        {
        file ise_v.msh
        frontiers
          {
          surface 124 inlet_1
          surface 125 inlet_2
          surface 126 outlet
          surface 128 walls
          }
        }

      Equation navier_stokes_incompressible eqn1
        {
        Medium water
       
        // boundary conditions block
        boundary_condition wall walls 0. 0. 0
        boundary_condition velocity inlet_1  0. 2. 0.
        boundary_condition velocity inlet_2  0. 2. 0.
        boundary_condition pressure_outlet outlet   0.0

        operator diffusion
        operator convection

        solver GMRES

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

        }

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

      end

      Alfonso

       
    • I changed the mesh. It looks like the .flw file has a stricter structure than the .geo file for example. I think one of my lines was not spaced correctly and the whole thing didn't work. Then I got your debuged code and did a side by side comparizon, made the format look the same and it worked.

       
    • I do have one more question.  what are the possible BC's in both of the possible equations?  for the NavSto equation, if My imput is m/s for speed then I would expect the output to be in m/s but what about the pressure? Is the output pressure in Pa, KPa, ATM,  BAR ? Is it documented in the code somewhere?

       
      • Possible BCs for Navier-Stokes equaion are at the moment :
        - inlet
        - walls
        - and pressure outlet

        The pressure given in the output is in fact P/rho,
        then it is like Pa/(kg/m3).
        Cheers,
        VortexFlow.

         
    • We had another presentation from a company called CFDesign. They had the most cool cfd package I have seen to date. I think it had a good interface and best of all the meshing and computation looked like clean software.. robust but small. As oposed to java for example. 22000 bucks for the software and one year of maintenance.

      I think the flw file format is OK and I would pay if the software came like that from a vendor. You know, the most impressive part about the CFDesign software was that it could export anything in animation for .ppt presentations and websites. Other than that, I got the same exact looking velocity vector field that I got with open flower. I think that if you got three things, thermal+flow coupled solver at the same time, gui documentation (better gui with more eye candy and dumb buttons for the dumb) and format/use documentation, then linux would have another killer app for another user group.

      Last week, I worked at work on figuring out how to use your software. It was nice to have pro/e open on one side with the boring windows XP theme and then my knoppix live computer on the other side doing actual work.  The knopix live CD will run both openflower and gmsh. Ubuntu breeze live CD does not have stcc5+++ library (the library name escapes me right now, but it looks like that). The normal Ubuntu will run both nicely. I liked how KDE worked, with the split qonkeror/cli window, but I like the regular gnome so I use Ubuntu at home. In any case, I saw no difference in performance between gnome and KDE. 

      Marry christmas,
      happy holyday (week/s)
      and or like me,
      happy festivus!

      festivus is for the rest of us!

      Fonss