robin.trunk
Forum Replies Created
-
AuthorPosts
-
robin.trunkKeymaster
Hi Alina,rnrn1)rnIn LBM the density differs from the pressure only by constants, you can find the relation in the LBconverter. Creating an output of physical density can be done by applying some arithmetic:rnphysDensity = charRho * latticeDensityrnYou can create your own output with AnalyticalXD objects and SuperLatticeFfromAnalyticalFXD. In your case it looks like this:rn
Code:AnalyticalConst3D<T,T> rhoAnalytical(converter.getCharRho());rn SuperLatticeFfromAnalyticalF3D<T,DESCRIPTOR> rhoLatticeF(rhoAnalytical, sLattice);rn SuperLatticeDensity3D<T, ADDESCRIPTOR> latticeDensity(sLattice);rn vtkWriter.addFunctor(rhoLatticeF*latticeDensity);rnrn2)rn
Quote:In my opinion, these initial conditions fill the channel by liquid flow with density = 1000kg/m^3 and velocity = 0.01 m/s and I have to set boundary conditions in lattice units.rnThats all correct. Usually the values rho=1 and u=(0,0,0) are used, this represents a domain filled with a fluid at rest.rnrnBestrnRobinrn
robin.trunkKeymasterHi Simon,rnrnit should work, I tried with the same Paraview version. Maybe doing a “”make clean”” to delete old files before executing helps.rnDoes some error show up?rnDid you change something in the code?rnrnBestrnRobin
robin.trunkKeymasterHi simonguornrnthe vti just contain a part of the geometry. This informations are assembled in the .pvd files. Just have a look at my today’s post in this topic:rnhttp://optilb.org/openlb/forum?mingleforumaction=viewtopic&t=159rnrnBestrnRobin
robin.trunkKeymasterHi quadropole,rnrnI just saw this question, sorry for the late reply. The vti just have the information for one Cuboid and one timestep.rnFor Each timestep in the same folder there is a file “”cylinder2d_iTxxxxx.pvd”” that shows the solution for the whole geometry in the specific timestep.rnIf you want to open all the data in Paraview so that you can press play, just open the file “”cylinder2d.pvd”” in the folder “”vtkData””.rnrnBestrnRobinrnrn
robin.trunkKeymasterHi quadrupole,rnrnthe code should be capable of the setup you want to simulate.rnFor LES simulations Smagorinsky turbulence models are implemented, that are easy to use. Also OpenLB has a build-in meshing tool, so external libraries are not required. You can build your own mesh from geometric primitives or read in STL-files, or combine boith methods.rnThe simulation for the video you mentioned are done, by a frame change method. With functors you can apply coriolis and rotational forces to the fluid and apply velocity boundaries to the cylinder. This method requires far less computational cost than remeshing every timestep, by exploiting the advantage that the static part of the mesh is rotational invariant, is that also the case for your stator?rnTo apply periodic boundary conditions you can have a look a the “”forcedPoiseuille”” example in OpenLB where those boundaries are applied.rnAs far as I understand with the sliding boundaries you want to simulate that the rotor does not touch / collide the stator but there is no fluid node in between. This should also be possible, applying the mentioned frame change method together with appropriate boundary conditions.rnrnDoes this answer alle your questions?rnrnIf you want to get started with OpenLB, there will be a spring school in march:rnhttp://optilb.org/openlb/spring-school-2017rnrnBestrnRobin
robin.trunkKeymasterHi aliiab,rnrnyou are usingrn
Quote:IndicatorCircle3D<T> sphere(center, normVector, 0.5*sphereDiam);rnfor your sphere. This creates just a disc in 3D, therefore no voxel gets the material number 0 assigned, since everything is surface.rnTo create a 3D-sphere, I suggest using IndicatorSphere3D<T> sphere(center, radius).rnrnBestrnRobin
robin.trunkKeymasterHi Alejandro,rnrn
Quote:It seems that “”advectionDiffusionBoundayPostProcessiorXD.h/hh”” it is only implemented in 3D, right?rnThis is correct, but for 2D it should be possible to do an analogue implementation.rnrn
Quote:the grad(U)*n = 0 (0 is the zero vector)rnWasn’t that just what you wanted? In your first post you wrote:rn
Quote:2. von Neumann boundary condition : The gradient of the velocity normal to the wall is zerornSo for free slip you want something similiar (replacing the vector n with a vector tangential to the surface), or am I wrong?rnrn
Quote:it seems that the nodes residing in the overlap region could not be implemented as a Slip-Boundary-Condition. Does someone know how to “”fix”” or overcome this problem?rnIf you refer to the “”could not add boundary”” messages in the beginning, this shouldn’t be a problem, since computations on the overlap are not required, hence no boundary condition has to be applied.rnrnBest regardsrnRobin
robin.trunkKeymasterHi Alejandro,rnrnyou are right, since the BounceBack is implemented as an Dynamics object, that replaces the standard collision step. This step is desired to be strictly local, therefore the code is not designed to allow non-local boundaries at this point.rnThe post processing is the right place for non-local boundary treatment. As an example you can look at the convection boundary implemented for advection diffusion problems. Especially at the filesrnopenlb > src > dynamics > advectionDiffusionBoundaryPostProcessor3D.h / .hhrnThe Generator creates an PostProcessor object that contains a function processSubDomain, where the actual treatment of the boundary is implemented.rnrndirection and orientation are computed from a discrete normal that is obtained byrndiscreteNormal = blockGeometryStructure.getStatistics().getType(iX,iY,iZ);rnThis normal is pointing outwards and discreteNormal[0] contains the type of boundary node (plane, edge, …). More information about this normal can be found in the doxygen.rnrnBest regardsrnRobin
robin.trunkKeymasterHi Alejandro,rnrn1) To write a new boundary like BounceBack, you can have a look at the dynamics.hh file in the src folder. I think implementing the boundary this way is mainly a copy and paste work of the BounceBack class and changing the collide function.rnrn2) I implemented a convection boundary for AdvectionDiffusion problems,that computes the missing f_i by extrapolation, for more information you can have a look at section 3.3 ofrnhttp://www.sciencedirect.com/science/article/pii/S1877750316300345rnI think there is also a ConvectionBoundary for the fluid that might be worth checking.rnrnBest regardsrnRobin
robin.trunkKeymasterHi Alejandro,rnrnthe way it is implemented, lattice units are used. In the example for the computation of the force also lattice units are used (getLatticeNu()).rnIf you want to implement gravity, you can do this analogously to the poiseuille-forced-2d example and convert the force in physical units to lattice units byrnconverter.latticeForce(value)rnFor more information have a look at the doxygen:rnhttp://optilb.com/DoxyGen/html/d1/d25/classolb_1_1LBconverter.html#a842f574807fc0592fd9deea0ad272fc0rnrnBest regardsrnRobin
robin.trunkKeymasterHi,rnrnI think this could be the same problem discussed in the topic “”Question about Cavity2d Example”” recently started by frankgao. Probably the points where the boundary can’t be set happen to be on the overlap?rnrnBest regardsrnRobin
robin.trunkKeymasterWhen using sequential mode the geometry is divided in 7 Cuboids in this examplernCuboidGeometry2D<T> cuboidGeometry(cuboid, converter->getLatticeL(), 7);rnthey reside on the same processor, but are treated separately and each owns a ghost layer for communication. Since you got 14 messages there are probably two nodes per Cuboid where the boundary can’t be set. This usually happens on the overlap, where the normal can’t be computed due to lack of information.rnrnBest regardsrnRobin
robin.trunkKeymasterHi Ivan,rnrndid it not work to build a std::vector and hand it to rename?rnstd::vector<int> dir ={ 0, -1 };rnsuperGeometry.rename(2,3,1,dir);rnrnBest regardsrnRobin
robin.trunkKeymasterHi,rnrnhow many processes did you use? It is possible that some querys fail on the overlap, but this does not affect the simulation. Do this local coordinates match the borders of your cuboids?rnrnBest regardsrnrobin
robin.trunkKeymasterHi Alejandro,rnrnthat’s strange. What Operating System are you using? Ubuntu? Windows with Cygwin?rnrnBest regardsrnRobin
-
AuthorPosts