コード例 #1
0
nitr = 5
while csh.time <= Ts:
    if (True):
        if ((csh.time <= time_points[j])
                and ((csh.time + csh.dt) > time_points[j])):
            print(time_points[j])
            #fn.save_figures_minerals(carb_rt,  max_pqty, time_points[j], path, nn, ptype=m)
            #fn.save_figures_mols(carb_rt, time_points[j], path, nn, ptype=m)
            j += 1
    csh.advance()
    results = fn.append_results(csh, results, step=S)

simulation_time = time.time() - it
fn.print_time(simulation_time, csh)
#%%
'''
fn.plot_species(results, names=[])#['calcite']
fn.plot_avg(results, names=['avg_poros', 'avg_D_eff'])
fn.plot_fields(csh, names=['calcite'],fsize=(15,1)) #,'Ca','Si'
fn.plot_points(results, names=['calcite', 'poros', 'Ca','pH'])
'''
#%% plot ca/si against density
'''
plt.figure()
plt.plot(results['Ca_Si'], results['csh_density'])
plt.legend()
plt.ylabel('CSH density')
plt.xlabel('C/S')
plt.show()
'''
コード例 #2
0
S = max(1, int(N / N_res))
'''
dt = csh.dt
Ts =  1.#seconds
Ts = Ts/scale + 0.001
N_res = 1e+4
S = max(1,int(N/N_res))
'''
#%% run
#n=1000

it = time.time()
while csh.time <= Ts:  #itr < nitr: #
    csh.advance()
    results = fn.append_results(csh, results, step=S)

simulation_time = time.time() - it
fn.print_time(simulation_time, csh)
#%%
fn.plot_species(results, names=[])  #['calcite']
fn.plot_avg(results, names=['avg_poros', 'avg_D_eff'])
fn.plot_fields(csh, names=['calcite'], fsize=(15, 1))  #,'Ca','Si'
fn.plot_points(results, names=['calcite', 'poros', 'Ca', 'pH'])

#%% plot ca/si against density
plt.figure()
plt.plot(results['Ca_Si'], results['csh_density'])
plt.legend()
plt.ylabel('CSH density')
plt.xlabel('C/S')
plt.show()
コード例 #3
0
#%% SIMULATION TIME
simulation_time = time.time() - it
fn.print_time(simulation_time, carb_rt)

#%%  SAVE
fn.save_obj(results, path + str(nn) + '_results')
np.save(path + 'SI', carb_rt.phrqc.selected_output()['SI_calcite'])
np.save(path + 'pH', carb_rt.phrqc.selected_output()['pH'])
np.save(path + 'Ca', carb_rt.phrqc.selected_output()['Ca'])
np.save(path + 'C', carb_rt.phrqc.selected_output()['C'])
np.save(path + 'De', carb_rt.fluid.Ca.De)
np.save(path + 'poros', carb_rt.fluid.Ca.poros)
#%% PLOT
fn.plot_species(results,
                names=['calcite', 'portlandite', 'Ca', 'C'],
                fsize=(6, 4))
fn.plot_fields(carb_rt, names={'calcite', 'portlandite', 'Ca', 'C'})

#%%PRINT

#print(carb_rt.fluid.Ca.De)
#print(carb_rt.fluid.C.De)
#print(carb_rt.fluid.Ca._c+carb_rt.fluid.Ca._ss)
#print(carb_rt.fluid.C._c+carb_rt.fluid.C._ss)
#print(carb_rt.solid.portlandite.c)
#print(carb_rt.solid.calcite.c)
#print(carb_rt.solid.poros)

#%%
'''