コード例 #1
0
measx = 10e-3
measy = 10e-3
meas2x = 70e-3
meas2y = 70e-3

#t0=-0.001
t0 = 0
dt = 0.05
nt = 1000  # was 100000

tvec = t0 + numpy.arange(nt, dtype='d') * dt

(dz, dy, dx, z, y, x, zgrid, ygrid, xgrid, z_bnd, y_bnd, x_bnd, z_bnd_z,
 z_bnd_y, z_bnd_x, y_bnd_z, y_bnd_y, y_bnd_x, x_bnd_z, x_bnd_y, x_bnd_x, r3d,
 r2d) = heatsim2.build_grid(0, 50.8e-3, nz, -0.1, 0.1, ny, -.12, .12, nx)

measi = np.argmin(abs(x - measx))
measj = np.argmin(abs(y - measy))

meas2i = np.argmin(abs(x - meas2x))
meas2j = np.argmin(abs(y - meas2y))

hole_depth = 9.525e-3  #6.35e-3 #9.525e-3;   # distance of hole from flash surface
water_depth = 12.7e-3
# distance of water volume from flash surface
hole_min_x = 0e-3
hole_max_x = 10e-3
hole_min_y = 0e-3
hole_max_y = 10e-3
コード例 #2
0
measx = 3e-3
measy = 3e-3
#measx=0.0e-3
#measy=0.0e-3

z_thick = 1.4e-3  # m

# Flash heating:

# Temperature after first frame should be:
#flash_energy/(composite_rho*composite_c*dz)

(dz, dy, dx, z, y, x, zgrid, ygrid, xgrid, z_bnd, y_bnd, x_bnd, z_bnd_z,
 z_bnd_y, z_bnd_x, y_bnd_z, y_bnd_y, y_bnd_x, x_bnd_z, x_bnd_y, x_bnd_x, r3d,
 r2d) = heatsim2.build_grid(0, z_thick, nz, -32.e-3, 32.e-3, ny, -30.e-3,
                            30.e-3, nx)

measi = np.argmin(abs(x - measx))
measj = np.argmin(abs(y - measy))

barrier_min_z = 0.8e-3
#barrier_min_z=z_thick
barrier_min_x = -3e-3
barrier_max_x = 3e-3
barrier_min_y = -2.e-3
barrier_max_y = 2.e-3

# define materials:
composite_k = .138  # W/m/deg K
composite_rho = 1.57e3  # W/m/deg K
composite_c = 730  # J/kg/deg K
コード例 #3
0
import heatsim2
import numpy as np
import pylab as pl

# Create x,y,z voxel center coords
nz = 5
ny = 50
nx = 55

(dz, dy, dx, z, y, x, zgrid, ygrid, xgrid, z_bnd, y_bnd, x_bnd, z_bnd_z,
 z_bnd_y, z_bnd_x, y_bnd_z, y_bnd_y, y_bnd_x, x_bnd_z, x_bnd_y, x_bnd_x, r3d,
 r2d) = heatsim2.build_grid(0, 1.4e-3, nz, -1.6e-3, 1.6e-3, ny, -1.5e-3,
                            1.5e-3, nx)

# define materials:
#titanium_k=6.7 # W/m/deg K
titanium_k = np.diag(np.array((6.7, 6.7, 6.7), dtype='d'))
titanium_rho = 4.43e3  # W/m/deg K
titanium_c = 526.3  # J/kg/deg K

materials = (
    # material 0: titanium
    (heatsim2.TEMPERATURE_COMPUTE, titanium_k, titanium_rho, titanium_c),
    # material 1: Titanium, fixed temperature (Dirichlet boundary condition)
    (
        heatsim2.TEMPERATURE_FIXED, ),
)

boundaries = (
    # boundary 0: conducting
    #(heatsim2.boundary_conducting,),
コード例 #4
0
#measy=0.3e-3
measx = 0.0e-3
measy = 0.0e-3

z_thick = 1.4e-3  # m

# Flash heating:

# Temperature after first frame should be:
#flash_energy/(composite_rho*composite_c*dz)

# final temperature should be flash_energy/(composite_rho*composite_c*z_thick)

(dz, dy, dx, z, y, x, zgrid, ygrid, xgrid, z_bnd, y_bnd, x_bnd, z_bnd_z,
 z_bnd_y, z_bnd_x, y_bnd_z, y_bnd_y, y_bnd_x, x_bnd_z, x_bnd_y, x_bnd_x, r3d,
 r2d) = heatsim2.build_grid(0, z_thick, nz, -16.e-3, 16.e-3, ny, -15.e-3,
                            15.e-3, nx)

measi = np.argmin(abs(x - measx))
measj = np.argmin(abs(y - measy))

# define materials:
composite_k = .138  # W/m/deg K
composite_rho = 1.57e3  # W/m/deg K
composite_c = 730  # J/kg/deg K

materials = (
    # material 0: composite
    (heatsim2.TEMPERATURE_COMPUTE, composite_k, composite_rho, composite_c), )

boundaries = (
    # boundary 0: conducting
コード例 #5
0
measx = 0.4e-3
measy = 0.3e-3

z_thick = 1.4e-3  # m

# Flash heating:

# Temperature after first frame should be:
#flash_energy/(composite_rho*composite_c*dz)

# final temperature should be flash_energy/(composite_rho*composite_c*z_thick)

(dz, dy, dx, z, y, x, zgrid, ygrid, xgrid, z_bnd, y_bnd, x_bnd, z_bnd_z,
 z_bnd_y, z_bnd_x, y_bnd_z, y_bnd_y, y_bnd_x, x_bnd_z, x_bnd_y, x_bnd_x, r3d,
 r2d) = heatsim2.build_grid(0, z_thick, nz, -1.6e-3, 1.6e-3, ny, -1.5e-3,
                            1.5e-3, nx)

measi = np.argmin(abs(x - measx))
measj = np.argmin(abs(y - measy))

(dz_fine, dy_fine, dx_fine, z_fine, y_fine, x_fine, zgrid_fine, ygrid_fine,
 xgrid_fine, z_bnd_fine, y_bnd_fine, x_bnd_fine, z_bnd_z_fine, z_bnd_y_fine,
 z_bnd_x_fine, y_bnd_z_fine, y_bnd_y_fine, y_bnd_x_fine, x_bnd_z_fine,
 x_bnd_y_fine, x_bnd_x_fine, r3d_fine,
 r2d_fine) = heatsim2.build_grid(0, z_thick, nz_fine, y_bnd[0], y_bnd[-1],
                                 ny_fine, x_bnd[0], x_bnd[-1], nx_fine)

measi_fine = np.argmin(abs(x_fine - measx))
measj_fine = np.argmin(abs(y_fine - measy))

barrier_min_z = 0.4e-3