Skip to content

shreyas

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: External flow in openLB – doubts #2093
    shreyas
    Member

    Dear Mathias,rnrnBy “”appropriate offset””, I am quite sure that you mean using the variable ‘pad’. But can you explain the variables ‘fraction’ and ‘samples’ in the read function please:rnrnread(BlockGeometry3D &matrix, unsigned direction,unsigned voxelNumber, unsigned pad, double fraction, unsigned samples)rnrnI have kept the values as 0.75 and 3u respectively. It seems to slow down terribly. Also, since I don’t have any surrounding walls, should I set an outflow/periodic condition to the channel walls?(previously all the geometry specified by the stl file, including the walls, were bounceback).rnrnThanks,rnShreyas rn

    in reply to: External flow in openLB – doubts #2091
    shreyas
    Member

    Before using setNx(), I thought of trying setOffset() as it is…but I get a runtime error(segmentation fault)! I have not used blockGeometry.reInit() – I think setOffset() itself does that. Am I correct? The only lines I added were the following.rnrn

    Code:
    rnrn nx1=blockGeometry.getNx();rn ny1=blockGeometry.getNy();rn nz1=blockGeometry.getNz();rncout<<””n Before offset, nx=””<<nx1<<””, ny=””<<ny1<<””and nz=””<<nz1<<endl;rnoffset1 = int((nx1 + ny1 + nz1)/6);rncout<<””Changing offset of “”<<blockGeometry.getOffset()<<”” to “”<<offset1<<endl;rnblockGeometry.setOffset(offset1);rnrnif (singleton::mpi().isMainProcessor()) {rn clout << “”Nx=”” << blockGeometry.getNx() << “”; Ny=”” << blockGeometry.getNy() << “”; Nz=”” <<blockGeometry.getNz() << endl;rn }rnrn /// THIS PART RESULTS IN A SEGMENTATION FAULT !!rn for (int iY = 1; iY < blockGeometry.getNy() – 1; iY++) {rn for (int iZ = 1; iZ < blockGeometry.getNz() – 1; iZ++) {rn blockGeometry.setMaterial(0, iY, iZ, 3);rn }rn }rnrn

    rnrnAnd this is the outputrnrnBefore offset, nx=252, ny=106and nz=245rnChanging offset of 0 to 100rn[main] Nx=252; Ny=106; Nz=245rnSegmentation fault (core dumped)rnrnIf I don’t get setOffset to work, I will change to Xp, Xn etc just like you suggested. But what am I doing wrong with setOffset() now?? 😐 rnrn

    in reply to: External flow in openLB – doubts #2089
    shreyas
    Member

    Dear Mathias,rnrnI can see that you have only one variable, ‘offset’ that adds onto all nx, ny and nz. Are you suggesting that I change ‘offset’ to maybe offset_x,offset_y,offset_z, or offset[3]? rnrnBut why can’t I just use..rnrnblockGeometry.setNx ( some new nX )rnblockGeometry.setNy ( some new nY )rnblockGeometry.setNz ( some new nZ ) rnrn..after reading geometry with stlReader.read() ? Its essentially doing the same thing right – changing nx, ny & nz? rn

    in reply to: External flow in openLB – doubts #2087
    shreyas
    Member

    More specifically, I have the geometry of the car/aircraft in .stl format and I can generate this file in a minute. But in the cylinder3D example, the ends are fused with the boundaries. So, when I use the stl reader, it decides that the flow domain is ONLY AS BIG AS the bounding box around the stl file.

Viewing 4 posts - 1 through 4 (of 4 total)