Skip to content

robin.trunk

Forum Replies Created

Viewing 15 posts - 76 through 90 (of 90 total)
  • Author
    Posts
  • in reply to: Parallel (MPI/OpenMP) simulation #2325
    robin.trunk
    Keymaster

    Hi Alejandro,rnrn””Makefile.inc”” refers to the file in the OpenLB main folder, since the whole library has to be compiled again for parallel execution. Important parts arernrnCXX := g++rn#CXX := icpc -D__aligned__=ignoredrn#CXX := mpiCCrn#CXX := mpic++rnrnPARALLEL_MODE := OFFrn#PARALLEL_MODE := MPIrn#PARALLEL_MODE := OMPrn#PARALLEL_MODE := HYBRIDrnrnHere you can chose the mode and compiler used by removing the “”#”” in the regarding lines. To clean the previous compiled library use make cleanbuild. To execute the program in parallel with mpi use mpirun as documented in the manual.rnrnBest regardsrnRobin

    in reply to: Doubts – Prepare Geometry – Cylinder3d #2324
    robin.trunk
    Keymaster

    Hi,rnrnsince the function prepareLattice is defined in the program and not part of the library, you can adapt it to whatever you need in your program.rnrnBest regardsrnRobin

    in reply to: Doubts – Prepare Geometry – Cylinder3d #2322
    robin.trunk
    Keymaster

    Hi Alejandro,rnrnto 1) yes the initial material number is 0rnrnto 2) the extendedDomain Indicator object is the same as the stlReader, but enlarged by converter.getLatticeL(). So material number 2 represents the fluid and walls after the first rename, after the second rename the fluid domain is set to 1 and a layer of 1 cell thickness remains representing the walls.rnrnto 3) clean removes mainly single exposed voxels, if you want to know it in detail you can find the function in the Doxygen documentation http://optilb.com/DoxyGen/html/d3/d2a/classolb_1_1BlockGeometryStructure3D.html#a0fb18a477673debb5bfc7568886b124drnrnto 4) the addZeroVelocityBoundary is applied to material number 5, that defines the walls of the cylinder. The stlReader object is handed to the function since more information about the geometry are required for the computation.rnrnBest regardsrnRobin

    in reply to: Multiphase Flow #2320
    robin.trunk
    Keymaster

    Hi Ivan,rnrnfor a first step you can have a look at the multiComponent2D example, where a Rayleigh-Taylor instability is simulated. This is done using the multi-component fluid model by X. Shan and H. Chen. For that you require two lattices, that are coupled via a CouplingGenerator (lines 294-297).rnrnBestrnRobin

    in reply to: beginner. How to install and perform?? #2319
    robin.trunk
    Keymaster

    Hi,rnyou can run Paraview like any other program. For an introduction to visualization with Paraview, you can have a look at the OpenLB user guide (especially section 7) on this website under Documentation > User Guide.rnrnBest,rnRobin

    in reply to: beginner. How to install and perform?? #2317
    robin.trunk
    Keymaster

    You can run the programm by ./cavity2d or in parallel by mpirun -np X cavity2d, here X gives the number of processes for parallel execution.rnThe resulting data for visualization can be found in the subfolder tmp/. In imageData are pictures written by the GifWriter, whereas in vtkData are files that can be visualized using Paraview. Here you have filters like the Stream Tracer or Contour that should do the job.rnrnBestrnRobin

    in reply to: beginner. How to install and perform?? #2313
    robin.trunk
    Keymaster

    Maybe you are in the wrong folder. You have to be in the folder of the program you want to make and run. For example if you want to run the cylinder2d example, first navigate to the folder byrncd openLB/examples/cylinder2d/ (path has to be adapted to your file structure)rnand then runrnmakernrnBestrnRobinrn

    in reply to: beginner. How to install and perform?? #2311
    robin.trunk
    Keymaster

    Hi, you can also install OpenLB on a Windows system, using Cygwin. There is a manual for that on this website:rnDocumentation > Tech. Reports > TR4rnI think this would be a good start.rnrnBestrnRobin

    in reply to: Data Analysis #2309
    robin.trunk
    Keymaster

    For the pressure drop you can create your own output file. However, OpenLB has no function for this, but it should be easy to implement with some C++ coding, keyword ofstream.rnTo receive information about the velocity at a specific point, you can proceed analogously to the pressure. The functor for the velocity is SuperLatticePhysVelocity2D<T, DESCRIPTOR> velocity(sLattice, converter); and it can be evaluated like the pressure at a point. The variables for the output (p1 and p2 for the pressure) however should be two dimensional fields.rnrnBestrnRobin

    in reply to: Data Analysis #2307
    robin.trunk
    Keymaster

    The pressure drop is computed in the cylinder2d example (line 263-285) and printed to the console. It is done by computing the pressure before and behind the cylinder (line 271-279) and taking the difference, just adapt this to your geometry.rnThe Reynolds number as well as other information are printed in cylinder2d.dat in the tmp folder.rnThe velocity field can be viewed and analysed in Paraview by opening the cylinder2d.pvd in tmp/vtkData with Paraview.rnrnBestrnRobin

    in reply to: Data Analysis #2305
    robin.trunk
    Keymaster

    Hi Ivan,rnthere are various possibilities for data extraction/analysis. It depends on what exactly you want to examine.rn

      rn

    • With the SuperVTKwriter3D<T> you can create output for Paraview, by adding functors, e.g. for velocity SuperLatticePhysVelocity3D<T, DESCRIPTOR> velocity(sLattice, converter); and vtkWriter.addFunctor(velocity);. This is done in the getResults function of the examples. To find other functors you can have a look at the doxygen documentation.rn
    • The BlockGifWriter<T> gives output pictures during the simulation, however this is rather for the pictures and a first look at the results during simulation, than analysis.rn
    • There are also functors for the flux, e.g. in the bifurcation example. Generally you can access the physical values by functors or the values of the distribution function and do your own evaluation/analysis. You can find some functors in the inheritance diagram of SuperLatticeF3D or SuperLatticeF2D in the developer guide (http://optilb.com/DoxyGen/html/d9/d80/classolb_1_1SuperLatticeF3D.html)rn

    rnrnBestrnRobin

    in reply to: Boundary condition for an open end #2303
    robin.trunk
    Keymaster

    Hi,rndid you modify the thermal3D example or did you start your own code?rnThe function addConvectionBoundary for the fluid expects three arguments, while the one for the temperature just expects two. So I assume the wrong function is called. This would explain the segmentation fault.rnIs TboundaryCondition initialized with a AdvectionDiffusion Descriptor as template and the SuperLattice in the arguement also?rnrnbestrnRobin

    in reply to: Changing Geometry #2301
    robin.trunk
    Keymaster

    Hi Ivan,rnrnit seems that some error checks for the Bouzidi boundary can’t handle multiple obstacles with the same material number. However, the later performed computations and the solution should not be affected by this. If you want to get rid of the error messages, you could assign a different material number to each object. I think that would be the fastest workaround.rnAlternatively you could try to construct an IndicatorF2D object from the circles, since for this object other functions are called, that maybe work better in the case of multiple objects.rnrnBestrnRobinrnrn

    in reply to: Boundary condition for an open end #2299
    robin.trunk
    Keymaster

    Hi,rnrnto allow a free outflow, the ConvectionBoundary can be used. It exists for the fluid and the temperature as well, simply replace the boundary condition for material number 3, for the fluid byrn NSboundaryCondition.addConvectionBoundary(superGeometry, 3, NSomega);rnand for the temperature byrn TboundaryCondition.addConvectionBoundary(superGeometry, 3);rnrnbestrnrobin

    in reply to: Changing Geometry #2298
    robin.trunk
    Keymaster

    Hi ivan,rnrnincreasing the value for lx1 inrnconst T lx1 = 5.0; // length of steprnshould move the step further from the inlet, or did you mean something else?rnrnFor the cylinder2d example it is possible to add more obstacles by creating more IndicatorCylinder2D objects. At line 84 of the example the existing obstacle is defined. You can add more round obstacles by insertingrnVector<T,2> center1(0.2,0.2); rnIndicatorCircle2D<T> circle(center1, 0.1);,rnjust change the values for the center and the radius (here 0.1). It is also possible to define rectangular obstacles byrnVector<T,2> center2(0.1,0.1); rnVector<T,2> extend1(0.2,0.14);rnIndicatorCuboid2D<T> cube(extend1,center2);.rnThis gives gives a cube 0.2 by 0.14. To apply the constructed obstacle for the simulation addrnsuperGeometry.rename(1,5,cube);rnas for the original obstacle in line 101 of the example. In this case the material numbers 1 will be set to 5 at every node occupied by the obstacle cube. The material numbers are used to assign e.g. boundary conditions to certain areas of the geometry. In cylinder2d everything with material number 5 is treated as obstacle.rnrnbestrnrobin

Viewing 15 posts - 76 through 90 (of 90 total)