Skip to content
Snippets Groups Projects
  1. Jan 08, 2010
  2. Jan 07, 2010
    • Jean-François Remacle's avatar
      5a5ffdc3
    • Bruno Seny's avatar
      MACH = 1.0; · 5f65dcff
      Bruno Seny authored
      GAMMA = 1.4;
      U = 3.0
      V = 0.0 
      RHO  = 1.4;
      
      PRES = RHO*U*U/(GAMMA*MACH*MACH)
      --PRES = 1;
      --PRES = ./(MACH*RHO*RHO*GAMMA*GAMMA) 
      
      SOUND = math.sqrt(U*U+V*V)/MACH
      
      --[[ 
           Function for initial conditions
      --]]
      function free_stream( XYZ, FCT )
        for i=0,XYZ:size1()-1 do
          FCT:set(i,0,RHO) 
          FCT:set(i,1,RHO*U) 
          FCT:set(i,2,RHO*V) 
          FCT:set(i,3, 0.5*RHO*(U*U+V*V)+PRES/(RHO*GAMMA-1)) 
        end
      end
      
      --[[ 
           Example of a lua program driving the DG code
      --]]
      order = 1
      print'*** Loading the mesh and the model ***'
      myModel   = GModel  ()
      myModel:load ('step.geo')
      myModel:load ('step.msh')
      
      print'*** Create a dg solver ***'
      DG = dgSystemOfEquations (myModel)
      DG:setOrder(order)
      FS = functionLua(4, 'free_stream', {'XYZ'}):getName()
      
      law=dgPerfectGasLaw2d()
      DG:setConservationLaw(law)
      
      law:addBoundaryCondition('Walls',law:newWallBoundary())
      law:addBoundaryCondition('LeftRight',law:newOutsideValueBoundary(FS))
      
      DG:setup()
      
      print'*** setting the initial solution ***'
      
      DG:L2Projection(FS)
      DG:limitSolution()
      
      print'*** export ***'
      
      DG:exportSolution('output/solution_0')
      
      print'*** solve ***'
      CFL = 2.0;
      
      for i=1,1000 do
          dt = CFL * DG:computeInvSpectralRadius();
          norm = DG:RK44_limiter(0.1*dt)
          print('*** ITER ***',i,dt, norm)
          if (i % 1 == 0) then 
             DG:exportSolution(string.format("output/solution-%06d", i)) 
          end
      end
      
      print'*** done ***'
      
      
      5f65dcff
    • Emilie Marchandise's avatar
      No commit message · 4edf3df5
      Emilie Marchandise authored
      No commit message
      4edf3df5
    • Emilie Marchandise's avatar
      No commit message · d14c50e4
      Emilie Marchandise authored
      No commit message
      d14c50e4
    • Bastien Gorissen's avatar
      24657044
    • Emilie Marchandise's avatar
      No commit message · bb5dea91
      Emilie Marchandise authored
      No commit message
      bb5dea91
  3. Jan 06, 2010
    • Matti Pellika's avatar
      Fix plugin. · e1b2b8c1
      Matti Pellika authored
      e1b2b8c1
    • Jean-François Remacle's avatar
      Finished the DG formulation (diffusive BC's) · aaf4e0cc
      Jean-François Remacle authored
      Added Navier Stokes & 2 test cases in DG
      Added binary restart capabilities in DG
      Added mesh renumbering option (-renumber)@
      
      aaf4e0cc
    • Matti Pellika's avatar
      4dcdf1fa
    • Jonathan Lambrechts's avatar
      remove uneeded forgotten include · beb6daab
      Jonathan Lambrechts authored
      beb6daab
    • Christophe Geuzaine's avatar
      ghost cells, take three -- ghost cells are now fully functional (for · 174c2296
      Christophe Geuzaine authored
      single file IO)
      
      TWO BIG WARNINGS:
      
      1) The MSH file version has been bumped from 2.1 to 2.2 because if a
      mesh has partitions, the meaning of the tags has changed. Tag 3 used
      to be the partition id; now tag 3 contains the number of partitions
      (self+ghosts, if necessary), and the next tag(s) contain(s) the
      partition(s) id(s). Ghost partitions have < 0 ids. The (new) default
      behaviour is to not save partition numbers by default if there are
      none.
      
      2) There is an issue for split-file IO (one file per partition), due
      to our on-the-fly renumbering of the elements (we would need a global
      pass+store an inverse multimap to have the correct ghost element
      numbers in a split-file scheme). The problem comes from the multiple
      physicals -> multiple copies of the same MElement* in the MSH file +
      our refusal to store an index in MElement. We need to discuss this
      before we implement split-file IO in parallel...
      
      
      
      PS -- I also changed the way we write binary files. We now save blobs
      of single elements. This is fully compatible with old versions, but
      might slow down reading large files. I did not see any performance hit
      on my machine, but this should be tested more thoroughly. Third party
      codes can still write larger binary blobs if they want to, but Gmsh
      itself now writes small blobs, which makes the writeMSH routine much
      simpler.
      
      
      174c2296
    • Jonathan Lambrechts's avatar
      41d4828d
  4. Jan 05, 2010
  5. Jan 04, 2010
  6. Jan 03, 2010
  7. Jan 01, 2010
  8. Dec 29, 2009
Loading