groupD.plotPSD() # Save the ensemble objects (pickle) for later use groupA.save() groupB.save() groupC.save() groupD.save() # add a blanket velocity to each half meshA.blanketVel(-1500., axis=1) meshB.blanketVel(+1500., axis=1) meshC.blanketVel(-1500., axis=1) meshD.blanketVel(+1500., axis=1) # combine the pairs of meshes meshAB = pss.combine_meshes(meshA, meshB, axis=1) meshCD = pss.combine_meshes(meshC, meshD, axis=1) # top and tail each mesh (delete top and bottom 3 rows of cells) meshAB.top_and_tail() meshCD.top_and_tail() # view each individual mesh meshA.viewMats() meshB.viewMats() meshC.viewMats() meshD.viewMats() # view final meshes meshAB.viewMats() meshCD.viewMats()
vfA = 1. - meshA.calcVol(frac=True) if vfA > v_void: break for xB, yB, gB in zip(groupBV.xc, groupBV.yc, groupBV.grains): gB.place(xB, yB, 0, meshB, mattargets=[9]) vfB = 1. - meshB.calcVol(frac=True) if vfB > v_void: break if first: groupAG.save() groupBG.save() groupAV.save() groupBV.save() meshA.blanketVel(-1500., axis=1) meshB.blanketVel(+1500., axis=1) meshC = pss.combine_meshes(meshA, meshB, axis=1) meshC.top_and_tail() meshC.viewMats() meshC.save(fname='regolith_vfG-{:2.2f}_vfV{:2.2f}_v3000.iSALE'.format( v_grain, v_void), compress=True) meshC.multiplyVels() meshC.save(fname='regolith_vfG-{:2.2f}_vfV{:2.2f}_v1500.iSALE'.format( v_grain, v_void), compress=True) meshC.multiplyVels() meshC.save(fname='regolith_vfG-{:2.2f}_vfV{:2.2f}_v750.iSALE'.format( v_grain, v_void), compress=True) meshA.fillAll(-1)
meshA.fillAll(-1) meshB.fillAll(-1) for xA, yA, gA, mA, xB, yB, gB, mB in zip(groupA.xc, groupA.yc, groupA.grains, groupA.mats, groupB.xc, groupB.yc, groupB.grains, groupB.mats): gA.place(xA, yA, mA, meshA) gB.place(xB, yB, mB, meshB) meshA.fillAll(9) meshB.fillAll(9) meshA.blanketVel(-1500., axis=1) meshB.blanketVel(+1500., axis=1) meshC = pss.combine_meshes(meshA, meshB, axis=1) meshC.top_and_tail() meshC.viewMats() meshC.save(fname='regolith_circles_v3000.iSALE', compress=True) meshC.multiplyVels() meshC.save(fname='regolith_circles_v1500.iSALE', compress=True) meshC.multiplyVels() meshC.save(fname='regolith_circles_v750.iSALE', compress=True) meshA.fillAll(-1) meshB.fillAll(-1) r = 0.5 r *= np.pi