Adrian
Forum Replies Created
-
AuthorPosts
-
AdrianKeymaster
Additional field data declared by the descriptor is saved / restored by the super lattice serialization.
Did you call
SuperLattice2D::postLoadas in e.g.examples/particles/magneticParticles3d/magneticParticles3d.cpp:591? This is called automatically in our current development version but unfortunately not in the current release.Depending on the exact code, there may be further obstacles in this particular example – e.g. the initial setup is random and non-reproducible by default. Also average rho in general is computed during collideAndStream and not up-to-date directly after reload.
If you post your adapted code I am happy to assist you further.
AdrianKeymasterlatticeNewis still only of size 2…AdrianKeymasterGlobal lattice locations in 2D are 3-component vectors – the first one is the cuboid number, not the x component.
August 2, 2021 at 9:31 pm in reply to: Poiseuille 2D (Erroneous results for lx and ly smaller than 1) #5882AdrianKeymasterReducing only the channel size without also changing the physical discretization resp.
Naccordingly results in a very small lattice. This simulation converges after only a small number of steps – before any VTK output were written.AdrianKeymastergetLatticeRaccepts the lattice location as its first argument, not the second.See e.g. the Doxygen documentation CuboidGeometry2D::getLatticeR.
July 28, 2021 at 9:02 pm in reply to: Poiseuille 2D (Erroneous results for lx and ly smaller than 1) #5856AdrianKeymasterThis is an artifact from gnuplot output and doesn’t impact the actual simulation results.
What do you mean by “get results for values smaller than 1”?
July 27, 2021 at 9:05 am in reply to: Extract force values from Lattice(Poiseuille 2D example) #5851AdrianKeymasterYou can get the external force vector for a given spatial cell location e.g. via
Cell<T,DESCRIPTOR> cell = superLattice.getBlockLattice(iC).get(iX,iY,iZ); Vector<T,3> force = cell.template getField<descriptors::FORCE>();- This reply was modified 4 years, 5 months ago by Adrian.
AdrianKeymasterI think you forgot to include the code in your last message.
AdrianKeymasterBounce back implemented as dynamics in OpenLB (i.e. as a local collision step) provide “fullway” bounce back. “Halfway” bounce back (implemented using a PostProcessor / Streaming modification) reflects the populations during streaming and e.g. requires no solid nodes. Both of them model a boundary mid way between grid points.
You can read more details in e.g. Krüger et al. “The Lattice Boltzmann Method: Principles and Practice” Section 5.3.3.2.
AdrianKeymasterHow do you define standard Bounce Back? OpenLB’s bounce back dynamics implement fullway bounce back (i.e. the populations are locally reverted during collision and not at streaming time).
AdrianKeymasterAs for the second question (you may consider opening separate threads for separate questions to keep things easy to follow for other users):
You do not need material indicators for that. I am not completely sure what you want to accomplish. If you only want to get the material data the VTK output included in every example is the most straight forward option.
If you have a lattice position [iC, iX, iY] you can get the material number via e.g.
SuperGeometry2D::getBlockGeometry(iC).get(iX, iY).AdrianKeymasterThe [iC, iX, iY] you get from the cuboid geometry loop are lattice coordinates that can be converted to physical coordinates via getPhysR. The additional lines
physCord[0] = double(iX)*cuboidGeometry.getMinDeltaR();are wrong – you would also need to add the cuboid start point. However, simply use getPhysR with latticeR set to [iC, iX, iY].- This reply was modified 4 years, 6 months ago by Adrian.
July 21, 2021 at 3:13 pm in reply to: Overlap for the FD BC and the simultaneous use of Bouzidi and a Thermal lattice #5835AdrianKeymasterw.r.t. the second bug: Could you provide more details in which context you use this? NoDynamics for inactive boundary cells should be correct as Bouzidi only reconstructs the populations streaming out of the boundary and not of the non-fluid cells by themselves.
July 21, 2021 at 3:10 pm in reply to: Overlap for the FD BC and the simultaneous use of Bouzidi and a Thermal lattice #5834AdrianKeymasterThank you very much for the bug reports!
I will take a closer on how to fix this in the general case but from your description this is definitiely something that should be handled differently. An overlap of 1 is correct for the interpolated velocity boundary by itself but doesn’t take into account the possibility of neighbor momenta requiring their own neighborhood – in the worst case this relationship could extend arbitrarily far. In a different context we are already investigating whether to communicate the momenta data from neighboring blocks instead of enabling only-partial computation from the overlap.
AdrianKeymasterThe call to getPhysR has to be inside to loop – currently the listing only calls it once at the beginning.
Independently of this “get(Min/Max)LatticeVolume” is not what you want here (they compute the minimum and maximum number of cells over the set of cuboids in the decomposition).
If you want the physical coordinates of all cells that are actually covered by cuboids in the geometry you can:
1. Iterate over all cuboids
for (int iC=0; iC < cGeometry.getNc(); ++iC) {2. Access the i-th cuboid
cuboid = cGeometry.get(iC)3. Iterate over the nodes of the cuboid
cuboid.getNx()resp.cuboid.getNy()4. Translate the lattice location
[iC, iX, iY]to its physical embedding viacGeometry.getPhysR -
AuthorPosts
