Construct diffusion coefficient ''' ######## These are the only numbers you need to change for the buildcoef2d class space = 24 * factor # fine elements between the dots ! thick = 2 * factor # fine elements in a dot ! bg = 0.1 #background val = 1 #values CoefClass = buildcoef2d.Coefficient2d(NFine, bg = bg, val = val, length = 1, thick = thick, space = space, probfactor = 1, right = 1, equidistant = True, ChannelVertical = True, BoundarySpace = True) # Set reference coefficient aFine_ref_shaped = CoefClass.BuildCoefficient() aFine_ref_shaped = CoefClass.SpecificMove(Number=np.arange(0,10), steps=4, Right=1) aFine_ref = aFine_ref_shaped.flatten() # decision
Construct diffusion coefficient ''' space = 3 * factor thick = 6 * factor bg = 0.1 #background val = 1 #values soilinput = np.array([[8, 6, 3], [8, 3, 6], [10, 3, 4]]) soilMatrix = buildcoef2d.soil_converter(soilinput, NFine, BoundarySpace=space) print(soilMatrix) CoefClass = buildcoef2d.Coefficient2d(NFine, bg=bg, val=val, length=thick, thick=thick, space=space, probfactor=1, right=1, equidistant=True, BoundarySpace=True, soilMatrix=soilMatrix) aFine = CoefClass.BuildCoefficient().flatten() plt.figure("Coefficient") drawCoefficient_origin(NFine, aFine) plt.show()
space = 20 thick = 2 bg = 0.1 #background val = 1 #values CoefClass = buildcoef2d.Coefficient2d(NFine, bg=bg, val=val, length=1, thick=thick, space=space, probfactor=1, right=1, down=0, diagr1=0, diagr2=0, diagl1=0, diagl2=0, LenSwitch=None, thickSwitch=None, equidistant=True, ChannelHorizontal=None, ChannelVertical=True, BoundarySpace=True) #global variables global aFine_ref global aFine_trans global aFine_pert global k
bg = 0.1 #background val = 1 #values # soilinput = np.array([[8, 6, 3],[8, 3, 6],[10, 3, 4]]) soilinput = np.array([[8, 8, 4], [8, 3, 6], [10, 4, 4]]) soilMatrix = buildcoef2d.soil_converter(soilinput, NFine) # print(soilMatrix) CoefClass = buildcoef2d.Coefficient2d(NFine, bg=bg, val=val, length=thick, thick=thick, space=space, probfactor=1, right=1, equidistant=True, BoundarySpace=True, soilMatrix=soilMatrix, normally_distributed_val=[1, 3], normally_distributed_bg=[0.01, 0.15]) # Set reference coefficient aFine_ref_shaped = CoefClass.BuildCoefficient() aFine_ref = aFine_ref_shaped.flatten() # decision valc = np.shape(CoefClass.ShapeRemember)[0] numbers = [] decision = np.zeros(50)