コード例 #1
0
boundaryConditions = np.array([[0, 0], [0, 0]])

NCoarseElement = NFine // NWorldCoarse
world = World(NWorldCoarse, NCoarseElement, boundaryConditions)
'''
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()
コード例 #2
0
NCoarseElement = NFine // NWorldCoarse
world = World(NWorldCoarse, NCoarseElement, boundaryConditions)
'''
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]])
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])