Hi all,
Is there a simple way to define a 2D parallelogram source?
edit:
succeed usuing DAT file, and then import as source file:
file1 = open("paraleloid.DAT","w")
Nx = 20
A = 4
B = 12
H = 9
theta = 30
a = A/Nx
h = H/(6*Nx)
dx = h / np.tan(np.pi*theta/180)
Ny = H/h
Ny = round(Ny)
N = Ny*Nx
L0 = str(N) +" "+str(4)+"\n"
file1.writelines(L0)
for j in range(Ny):
for i in range(Nx):
L1 = str(round(i*a+j*dx,2))+" "+str(round(h*j,2))+" "+str(0) +" "+str(0) +" "+str(0) +" "+str(1)+" "+str(1)+"\n"
file1.writelines(L1)
file1.close() #to change file access modes
Thanks,
Nadav