Beispiel #1
0
va = 1.0 / gas.density

n = np.int((va - 0.4 * vcj) / 0.01)
PH2 = np.zeros(n + 1, float)
vH2 = np.zeros(n + 1, float)

PH2[0] = gas.P / ct.one_atm
vH2[0] = va

i = 0
vb = va
while (i < n):
    vb = va - (i + 1) * 0.01
    #Always starts at new volume and previous temperature to find next state
    fval = fsolve(hug_eq, Ta, args=(vb, h1, P1, v1, gas))
    gas.TD = fval, 1.0 / vb
    PH2[i + 1] = gas.P / ct.one_atm
    vH2[i + 1] = vb
    i = i + 1

print('Product Hugoniot Array Created')

if (fname == 0):
    print('No output files created')
else:
    #Create Output Data File for Tecplot
    import datetime
    a = np.size(PR) - 1
    k = 0
    d = datetime.date.today()
    P = P1 / ct.one_atm
Beispiel #2
0
va = 1 / gas.density

PH2 = [gas.P / ct.one_atm]
vH2 = [va]
Grun = [gruneisen_eq(gas)]
gamma = [(soundspeed_eq(gas))**2 / (vH2[0] * gas.P)]
denom = [1 + Grun[0] * (vH2[0] - v1) / (2 * vH2[0])]

i = 0
vb = va
while vb > vmin:
    i = i + 1
    vb = va - i * .01
    # use new volume and previous temperature to find next state
    fval = fsolve(hug_eq, Ta, args=(vb, h1, P1, v1, gas))
    gas.TD = fval, 1 / vb

    PH2.append(gas.P / ct.one_atm)
    vH2.append(vb)
    Grun.append(gruneisen_eq(gas))
    gamma.append((soundspeed_eq(gas))**2 / (vH2[-1] * gas.P))
    denom.append(1 + Grun[-1] * (vH2[-1] - v1) / (2 * vH2[-1]))

print('Product Hugoniot Array Created')

## isentropes near CJ point
gas.TPX = tcj, pcj, qcj
s = scj * .98
deltas = 0.01 * scj

jmax = 4