Ejemplo n.º 1
0
domain = yantra.Domain2D(corner=(0, 0),
                         lengths=(lx, ly),
                         dx=dx,
                         grid_type='nodal')
domain.nodetype[:, ll + 1:ll + l_ch] = ct.Type.MULTILEVEL
domain.nodetype[0, :] = ct.Type.SOLID
domain.nodetype[-1, :] = ct.Type.SOLID
domain.nodetype[:, -1] = ct.Type.SOLID

plt.figure(figsize=(5, 5))
plt.imshow(domain.nodetype)
plt.show()

#%%  VALUES
nn = os.path.basename(__file__)[:-3]
fn.make_output_dir(root_dir + '\\results\\output\\07_pco2\\')
path = root_dir + '\\results\\output\\07_pco2\\' + nn + '\\'
fn.make_output_dir(path)

phrqc_input = {
    'c_bc': {
        'type': 'pco2',
        'value': 2.52
    },  #3.05E-02, 3.74E-02, 4.30E-02
    'c_mlvl': {
        'type': 'conc',
        'value': '0'
    },
    'c_liq': {
        'type': 'conc',
        'value': '0'
Ejemplo n.º 2
0
    domain.nodetype[:, -1] = ct.Type.SOLID

    plt.figure(figsize=(5, 5))
    plt.imshow(domain.nodetype)
    plt.show()

    #%%  PHREEQC
    scale = 100  # scale of molar volume
    mvol = [62.43e-3 * scale]  #m3/mol # CSH Jennite and SiO2
    max_pqty = fn.get_max_pqty(mvol)  #mol/m3
    init_conc = fn.set_init_pqty(mvol, scale=scale,
                                 porosCH=0.45)  #TODO replace porosity CSH

    nn = os.path.basename(__file__)[:-3]
    nn += '_' + str(f)
    fn.make_output_dir(root_dir + '\\results\\output_csh\\03_leaching')
    path = root_dir + '\\results\\output_csh\\03_leaching\\' + nn + '\\'
    fn.make_output_dir(path)
    phase_name = m
    phrqc_input = {
        'csh_mol': {
            'value': str(init_conc[0])
        },
        'csh': {
            'name': phase_name,
            'stochiometry': {
                'Ca': 1.25,
                'Si': 1.0,
                'H2O': 3.42
            },
            'log_k': -14
Ejemplo n.º 3
0
domain = yantra.Domain2D(corner=(0, 0),
                         lengths=(lx, ly),
                         dx=dx,
                         grid_type='nodal')
domain.nodetype[:, ll + 1:ll + l_ch] = ct.Type.MULTILEVEL
domain.nodetype[0, :] = ct.Type.SOLID
domain.nodetype[-1, :] = ct.Type.SOLID
domain.nodetype[:, -1] = ct.Type.SOLID

plt.figure(figsize=(5, 5))
plt.imshow(domain.nodetype)
plt.show()

#%%  VALUES
nn = os.path.basename(__file__)[:-3]
fn.make_output_dir(root_dir + '\\results\\output\\04_internal_energy\\')
path = root_dir + '\\results\\output\\04_internal_energy\\' + nn + '\\'
fn.make_output_dir(path)

phrqc_input = {
    'c_bc': {
        'type': 'pco2',
        'value': 3.4
    },  #3.05E-02, 3.74E-02, 4.30E-02
    'c_mlvl': {
        'type': 'conc',
        'value': '0'
    },
    'c_liq': {
        'type': 'conc',
        'value': '0'
Ejemplo n.º 4
0
ly = 2.0e-6
dx = 1.0e-6

domain = yantra.Domain2D(corner=(0, 0),
                         lengths=(lx, ly),
                         dx=dx,
                         grid_type='nodal')
domain.nodetype[:, ll + 1:ll + l_csh + 1] = ct.Type.MULTILEVEL
domain.nodetype[0, :] = ct.Type.SOLID
domain.nodetype[-1, :] = ct.Type.SOLID
domain.nodetype[:, -1] = ct.Type.SOLID

#%%  VALUES
m = 'CSH'  #or 'CSH'
nn = os.path.basename(__file__)[:-3]
fn.make_output_dir(root_dir + '\\results\\output_csh\\01_default\\')
path = root_dir + '\\results\\output_csh\\01_default\\' + nn + '\\'
fn.make_output_dir(path)

phrqc_input = {
    'c_bc': {
        'type': 'pco2',
        'value': 2.0
    },
    #'c_bc':{'type':'conc', 'value': 0.01},
    'c_mlvl': {
        'type': 'eq',
        'value': 'calcite'
    },
    'c_liq': {
        'type': 'eq',
Ejemplo n.º 5
0
domain = yantra.Domain2D(corner=(0, 0), 
                         lengths=(lx, ly), 
                         dx=dx, 
                         grid_type='nodal')
domain.nodetype[:, ll+1: ll+l_ch] = ct.Type.MULTILEVEL
domain.nodetype[0,:] = ct.Type.SOLID
domain.nodetype[-1,:] = ct.Type.SOLID
domain.nodetype[:,-1] = ct.Type.SOLID

plt.figure(figsize=(5,5))
plt.imshow(domain.nodetype) 
plt.show()

#%%  VALUES
nn=os.path.basename(__file__)[:-3]
fn.make_output_dir(root_dir+'\\results\\output\\02_molar_volume\\')
path = root_dir+'\\results\\output\\02_molar_volume\\' + nn + '\\'
fn.make_output_dir(path)

phrqc_input = {'c_bc':{'type':'pco2', 'value': 3.4}, #3.05E-02, 3.74E-02, 4.30E-02
               'c_mlvl':{'type':'conc', 'value': '0'}, 
               'c_liq':{'type':'conc', 'value': '0'},
               'ca_mlvl':{'type':'eq', 'value': 'portlandite'}, 
               'ca_liq':{'type':'conc', 'value': '0'}}#calcite
phrqc = fn.set_phrqc_input(phrqc_input)            
fn.save_phrqc_input(phrqc,root_dir, nn)   

scale = 100. # scale of molar volume
init_porosCH = 0.05 #initial porosity of portlandite nodes
mvol_ratio = 3.69/3.31
mvolCH = 0.0331*scale
Ejemplo n.º 6
0
                             lengths=(lx, ly),
                             dx=dx,
                             grid_type='nodal')
    domain.nodetype[:, (ll + 1):ll + l_ch] = ct.Type.MULTILEVEL
    domain.nodetype[0, :] = ct.Type.SOLID
    domain.nodetype[-1, :] = ct.Type.SOLID
    domain.nodetype[:, -1] = ct.Type.SOLID

    plt.figure(figsize=(5, 5))
    plt.imshow(domain.nodetype)
    plt.show()

    #%%  PHREEQC
    nn = os.path.basename(__file__)[:-3]
    nn += str(f)
    fn.make_output_dir(root_dir + '\\results\\output\\10_subgrid_leaching')
    path = root_dir + '\\results\\output\\10_subgrid_leaching\\' + nn + '\\'
    fn.make_output_dir(path)
    phrqc_input = {
        'ca_bc': {
            'type': 'conc',
            'value': '0.0'
        },
        'ca_mlvl': {
            'type': 'eq',
            'value': 'portlandite'
        },
        'ca_liq': {
            'type': 'conc',
            'value': '0'
        }
Ejemplo n.º 7
0
domain = yantra.Domain2D(corner=(0, 0),
                         lengths=(lx, ly),
                         dx=dx,
                         grid_type='nodal')
domain.nodetype[:, ll + 1:ll + l_ch] = ct.Type.MULTILEVEL
domain.nodetype[0, :] = ct.Type.SOLID
domain.nodetype[-1, :] = ct.Type.SOLID
domain.nodetype[:, -1] = ct.Type.SOLID

plt.figure(figsize=(5, 5))
plt.imshow(domain.nodetype)
plt.show()

#%%  PHREEQC
nn = '01_example_default'
fn.make_output_dir(root_dir + '\\results\\output\\00_examples\\')
path = root_dir + '\\results\\output\\00_examples\\' + nn + '\\'
fn.make_output_dir(path)
phrqc_input = {
    'c_bc': {
        'type': 'pco2',
        'value': 3.4
    },
    'c_mlvl': {
        'type': 'eq',
        'value': 'calcite'
    },
    'c_liq': {
        'type': 'eq',
        'value': 'calcite'
    },
Ejemplo n.º 8
0
domain = yantra.Domain2D(corner=(0, 0),
                         lengths=(lx, ly),
                         dx=dx,
                         grid_type='nodal')
domain.nodetype[:, ll + 1:ll + l_ch] = ct.Type.MULTILEVEL
domain.nodetype[0, :] = ct.Type.SOLID
domain.nodetype[-1, :] = ct.Type.SOLID
domain.nodetype[:, -1] = ct.Type.SOLID

plt.figure(figsize=(5, 5))
plt.imshow(domain.nodetype)
plt.show()
#%%  VALUES
m = 'CSH'  #or 'CSH'
nn = os.path.basename(__file__)[:-3]
fn.make_output_dir(root_dir + '\\results\\temp\\01_develop\\')
path = root_dir + '\\results\\temp\\01_develop\\' + nn + '\\'
fn.make_output_dir(path)

phrqc_input = {
    'c_bc': {
        'type': 'pco2',
        'value': 2.0
    },  # 0.1% CO2
    'c_mlvl': {
        'type': 'eq',
        'value': 'calcite'
    },
    'c_liq': {
        'type': 'eq',
        'value': 'calcite'
Ejemplo n.º 9
0
root_dir = os.path.dirname(
    os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
src_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(root_dir)
sys.path.append(src_dir)
import matplotlib.pylab as plt
import numpy as np

np.set_printoptions(precision=5, threshold=np.inf)
import misc_func as fn
import func as cf
#%% SETTINGS
Ts = 100.
fname = 'pco2'
fpath = root_dir + '\\results\\output\\07_pco2\\compare\\'
fn.make_output_dir(fpath)
#names = np.array([ '02_pco2_0', '02_pco2_1', '02_pco2_2', '02_pco2_3', '01_reference'])
#names = np.array(['02_pco2_1_p005', '03_pco2_2_p005','04_pco2_3_p005', '05_pco2_34_p005'])
#names = np.array(['02_pco2_1_p005', '03_pco2_2_p005', '04_pco2_3_p005', '05_pco2_34_p005'])
#names = np.array(['01_p005_c34m_ll1', '03_p005_c252m_ll1', '06_p005_c152m_ll1', '05_p005_c1m_ll1'])
#label = np.array(['0.04%', '0.3%', '3%', '10%'])
#names = np.array(['01_p005_c34', '03_p005_c252', '06_p005_c152', '05_p005_c1'])
#names = np.array(['01_p005_c34m', '02_p005_c3m', '03_p005_c252m', '04_p005_c2m', '06_p005_c152m', '05_p005_c1m'])
#names = np.array(['01_p005_c34m', '03_p005_c252m', '06_p005_c152m', '05_p005_c1m'])
#names = np.array(['08_p0_D13', '08_p052_D13', '08_p1_D13', '08_p152_D13', '08_p2_D13', '08_p34_D13'])
#names = np.array(['08_p052_D13', '08_p1_D13', '08_p152_D13', '08_p252_D13', '08_p34_D13'])
#names = np.array(['08_p1_D13', '08_p152_D13', '08_p252_D13', '08_p34_D13'])

names = np.array('01_pco2_0.03', '01_pco2_0.1', '01_pco2_0.3', '01_pco2_1.0',
                 '01_pco2_3.0', '01_pco2_10.0', '01_pco2_30.0',
                 '01_pco2_100.0')
Ejemplo n.º 10
0
domain = yantra.Domain2D(corner=(0, 0),
                         lengths=(lx, ly),
                         dx=dx,
                         grid_type='nodal')
domain.nodetype[:, ll + 1:ll + l_ch] = ct.Type.MULTILEVEL
domain.nodetype[0, :] = ct.Type.SOLID
domain.nodetype[-1, :] = ct.Type.SOLID
domain.nodetype[:, -1] = ct.Type.SOLID

plt.figure(figsize=(5, 5))
plt.imshow(domain.nodetype)
plt.show()

#%%  VALUES
nn = os.path.basename(__file__)[:-3]
fn.make_output_dir(root_dir + '\\results\\output\\06_D_laws\\')
path = root_dir + '\\results\\output\\06_D_laws\\' + nn + '\\'
fn.make_output_dir(path)

phrqc_input = {
    'c_bc': {
        'type': 'pco2',
        'value': 3.4
    },  #3.05E-02, 3.74E-02, 4.30E-02
    'c_mlvl': {
        'type': 'conc',
        'value': '0'
    },
    'c_liq': {
        'type': 'conc',
        'value': '0'
Ejemplo n.º 11
0
domain = yantra.Domain2D(corner=(0, 0),
                         lengths=(lx, ly),
                         dx=dx,
                         grid_type='nodal')
domain.nodetype[:, ll + 1:ll + l_ch] = ct.Type.MULTILEVEL
domain.nodetype[0, :] = ct.Type.SOLID
domain.nodetype[-1, :] = ct.Type.SOLID
domain.nodetype[:, -1] = ct.Type.SOLID

plt.figure(figsize=(5, 5))
plt.imshow(domain.nodetype)
plt.show()

#%%  VALUES
nn = os.path.basename(__file__)[:-3]
fn.make_output_dir(root_dir + '\\results\\output\\05_crystal_pore_size\\')
path = root_dir + '\\results\\output\\05_crystal_pore_size\\' + nn + '\\'
fn.make_output_dir(path)

phrqc_input = {
    'c_bc': {
        'type': 'pco2',
        'value': 3.4
    },  #3.05E-02, 3.74E-02, 4.30E-02
    'c_mlvl': {
        'type': 'conc',
        'value': '0'
    },
    'c_liq': {
        'type': 'conc',
        'value': '0'
Ejemplo n.º 12
0
domain = yantra.Domain2D(corner=(0, 0),
                         lengths=(lx, ly),
                         dx=dx,
                         grid_type='nodal')
domain.nodetype[:, ll + 1:ll + l_ch] = ct.Type.MULTILEVEL
domain.nodetype[0, :] = ct.Type.SOLID
domain.nodetype[-1, :] = ct.Type.SOLID
domain.nodetype[:, -1] = ct.Type.SOLID

plt.figure(figsize=(5, 5))
plt.imshow(domain.nodetype)
plt.show()

#%%  VALUES
nn = os.path.basename(__file__)[:-3]
fn.make_output_dir(root_dir + '\\results\\output\\03_fraction\\')
path = root_dir + '\\results\\output\\03_fraction\\' + nn + '\\'
fn.make_output_dir(path)

phrqc_input = {
    'c_bc': {
        'type': 'pco2',
        'value': 3.4
    },  #3.05E-02, 3.74E-02, 4.30E-02
    'c_mlvl': {
        'type': 'conc',
        'value': '0'
    },
    'c_liq': {
        'type': 'conc',
        'value': '0'