Reply To: How to create the cuboidGeometry for a inclined 2D cuboid geometry
Due to recent bot attacks we have changed the sign-up process. If you want to participate in our forum, first register on this website and then send a message via our contact form.
› Forums › OpenLB › General Topics › How to create the cuboidGeometry for a inclined 2D cuboid geometry › Reply To: How to create the cuboidGeometry for a inclined 2D cuboid geometry
October 31, 2021 at 3:47 pm
#6127
Gloriousface
Participant
Hi Fany:
You can use BlockGeometryXD to specify the name of the cell with its location. Firstly you instantiate one object with BlockGeometryXD, BlockGeometryXD<T> &BG=superGeometry.getExtendedBlockGeometry(iC), where iC is the index of the block. Then the size of this BG is get with Nx=BG.getNx() and Ny=BG.getNy(); Then in a for loop with ix from 2 to Nx-2, iy from 2 to Ny-2, get the physical position of the cell with BG.getPhysR(phr,ix,iy); if the physical position statisfies the requiement, rename the cell with BG.get(ix,iy)=2 for example.
