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

how to creat the first .flw file?

Help
2006-07-26
2013-04-09
  • I have both openflower and gmash successfully installed onto my pc. I understand from the manual how to creat the geo and msh files, but I cannot see any guidance on how to create my first flw file which according to the manual is necessary for openflower t perform a calculation. Please advise.

     
    • Hi,
      The easiest way to make a flw file is to copy one of the examples and modify somewhat. I have done a lot of trial-and-error as there is not much documentation. Here is what I have found so far:

      TimeBegin 0.0  // Obviously, the start time
      TimeEnd 5.0   // Also obvious, end time
      MaxTimeSteps 5000   // This kills the simulation at a given timestep, whether or not it has reached the end time. This is useful to deal with divergence.
      CFL 0.5  // This is the accuracy knob. Small numbers (close to 0) cause the simulation to go more slowly, while large numbers (close to 1) cause the simulation to go faster. Turning it down helps with convergence of tricky systems.

      Medium water
      {
      rho    1.   // density
      mu     0.004  // dynamic viscosity
      }

      Algorithm AlgoNavierStokes { eqn1 }  // I am using the navier stokes equations

      Mesh gmsh
        {
        file simulation.msh  // this is the path to the mesh file
        frontiers
          {
          surface 922 inlet  // the physical surface number defined in gmsh
          surface 923 outlet  // ditto
          surface 921 walls  // ditto
          }
        }

      Equation navier_stokes_incompressible eqn1
        {
        Medium water
       
        // boundary conditions block
        boundary_condition wall walls 0. 0. 0.  // specifies that walls mean velocity of 0
        boundary_condition velocity inlet 0.1 0. 0.  // constant velocity in the inlet of 0.1 in the x direction
        boundary_condition pressure_outlet outlet   0.  // constant pressure on the outlet
        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.05  // the last number here, 0.05 defines the amount of time per output frame. In this case, openflower outputs one .pos file that can be read by gmsh every 0.05 seconds.
      // global gmsh eqn1.Pressure 0. 1000.0 0.01  // same for pressure. I only cared about velocity, so I commented it out.
        probe eqn1.Velocity 0. 1000. 0.001 position 0.5 0.1 0.1
        }

      end

      Hope this helps!

      -john

       
    • Thanks for this. I'm curious though: in your first paragraph you make reference to example files (presumable you mean example flw files).

      Well, my openflower installation folder contains only the binary file. The gmsh folder contains demos and tutorial folders but I couldn't see any flw files, only various geo, i1, script. Could you elaborate please?

      I offered to volunteer to write furter documentation for novices such as me; no reply as yet. Is worth considering some sort of openflower wiki?

       
    • Hi,
      To get the examples, download the source bundle from the downloads page. They are paired sets of geo and flw files. The wiki is a good idea, but I don't think openflower is documented well enough to be fully usable yet, and making such documentation would be very challenging without the input of the developers. If you are trying to do simulations rather than develop a cfd, I would check out the gerris flow solver (gvs.sourceforge.net). It is an open sourced cfd, much like openflower, only extremely well documented and extensively and actively developed.

      -John

       
    • Thanks for your advice.

      It's a pity the developers do not appear interested in openflower any more...