<jupyter_start><jupyter_text>- tiny 2: base- tiny 2_1: the specific capacities of all the species are the same- tiny 2_2: based on 2_1top and bottom B.C. are periodic - tiny 2_3: based on tiny2_2, automatic control time step based on the chemical time step- tiny 2_4: based on tiny2_3, use the PCGStab solver- tiny 2_6: based on tiny2_4, use the structured decomposition rule- tiny 2_7: based on tiny2_1, use automatic control time step and the structured decomposition rule<jupyter_code>print("structured decomposition")
Image("./structured decomposition.png")<jupyter_output>structured decomposition rule<jupyter_text>Compare the combustion temperature<jupyter_code>def reaMinMaxFile(fieldminMaxFile):
    with open(fieldminMaxFile,"r") as fp:
        comment=fp.readline()
        header=fp.readline()
    header=header[1:-1].split()
    indexs_processor=[]
    for i,name in enumerate(header):
        if header[i]=="processor":
            indexs_processor.append(i)
    indexs_processor.reverse()  

    data=pd.read_csv(fieldminMaxFile,comment='#', sep='\t',header=None)
    data=data.drop(indexs_processor,axis=1)
    data.rename(columns=lambda x:header[x],inplace=True)
    return data
df_tiny2=reaMinMaxFile(r"./tiny2/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2.head()
df_tiny2_1=reaMinMaxFile(r"./tiny2_1/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2_1.head()
df_tiny2_2=reaMinMaxFile(r"./tiny2_2/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2_2.head()
fig, ax = plt.subplots()
ax.set_xlabel(f"Time (s)")
ax.set_title(f"Temporal Evolution of Maximum Temperature",color="k")

ax.plot(df_tiny2["Time"],df_tiny2["max"]/Tref,linestyle="-",label="Tiny 2",color="b")
ax.plot(df_tiny2_1["Time"],df_tiny2_1["max"]/Tref,linestyle="--",label="Tiny 2-1",color="r")
ax.plot(df_tiny2_2["Time"],df_tiny2_2["max"]/Tref,linestyle="-.",label="Tiny 2-2",color="k")
ax.set_ylabel(f"Dimensionless T",color="b")
ax.legend()
fig, ax = plt.subplots()
ax.set_xlabel(f"Time (s)")
ax.set_title(f"Temporal Evolution of Minimum Temperature",color="k")

ax.plot(df_tiny2["Time"],df_tiny2["min"]/Tref,linestyle="-",label="Tiny 2",color="b")
ax.plot(df_tiny2_1["Time"],df_tiny2_1["min"]/Tref,linestyle="--",label="Tiny 2-1",color="r")
ax.plot(df_tiny2_2["Time"],df_tiny2_2["min"]/Tref,linestyle="-.",label="Tiny 2-2",color="k")
ax.set_ylabel(f"Dimensionless T",color="b")<jupyter_output><empty_output><jupyter_text>Compare the combustion temperature between manual and autmatic time step  performance- tiny2_2: manual, 2104.68 s- tiny2_3: automatic, 2080.03 s  - tiny2_4: use the PCGStab solver, 2196.01 s- tiny2_5: p_rgh solver PCG:  4774.48 s - tiny2_6: structured decomposition: 1838.38 s<jupyter_code>df_tiny2_3=reaMinMaxFile(r"./tiny2_3/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2_3.head()
df_tiny2_4=reaMinMaxFile(r"./tiny2_4/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2_4.head()
df_tiny2_5=reaMinMaxFile(r"./tiny2_5/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2_5.head()
df_tiny2_6=reaMinMaxFile(r"./tiny2_6/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2_6.head()
fig, ax = plt.subplots()
ax.set_xlabel(f"Time (s)")
ax.set_title(f"Temporal Evolution of Maximum Temperature",color="k")

ax.plot(df_tiny2_2["Time"],df_tiny2_2["max"]/Tref,linestyle="-",label="Tiny 2-2",color="r")
ax.plot(df_tiny2_3["Time"],df_tiny2_3["max"]/Tref,linestyle="--",label="Tiny 2-3",color="b")
# ax.plot(df_tiny2_4["Time"],df_tiny2_4["max"]/Tref,linestyle="-.",label="Tiny 2-4",color="k")
ax.plot(df_tiny2_5["Time"],df_tiny2_5["max"]/Tref,linestyle=":",label="Tiny 2-5",color="y")
ax.plot(df_tiny2_6["Time"],df_tiny2_6["max"]/Tref,linestyle="-.",label="Tiny 2-6",color="k")
ax.set_xlim([0,0.1])
ax.set_ylabel(f"Dimensionless T",color="b")<jupyter_output><empty_output><jupyter_text>Comments- all the result are the same except the performance- the GAMG solver with the GaussSeidel smoother for p_rgh solver is recommended - scalar eqn: the performance the GAMG solver with the GaussSeidel smoother and the PBiCGStab solver with the DILU preconditioner are approximate - automatic time step control is acceptable - structured decomposition is better than the scotch in this case- top/bottom周期性边界调节，不能横向划分subdomain(沿着top/bottom的边)- top/bottom绝热边界条件，横向划分subdomain不如纵向效率高  Compare the combustion temperature between manual and autmatic time step， and with and without renumberMesh -overwrite  performance - tiny2_1: manual, without renumberMesh -overwrite, 2177 s- iny2_7, automatic, with renumberMesh -overwrite, 1538.03 s<jupyter_code>df_tiny2_1=reaMinMaxFile(r"./tiny2_1/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2_1.head()
df_tiny2_7=reaMinMaxFile(r"./tiny2_7/postProcessing/minMaxComponents/0/fieldMinMax.dat")
df_tiny2_7.head()
fig, ax = plt.subplots()
ax.set_xlabel(f"Time (s)")
ax.set_title(f"Temporal Evolution of Maximum Temperature",color="k")

ax.plot(df_tiny2_1["Time"],df_tiny2_1["max"]/Tref,linestyle="-",label="Tiny 2-1",color="r")
ax.plot(df_tiny2_7["Time"],df_tiny2_7["max"]/Tref,linestyle="--",label="Tiny 2-7",color="b")
ax.set_xlim([0,0.1])
ax.set_ylabel(f"Dimensionless T",color="b")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15651340996168583, 'fraction_numerical': 0.04176245210727969, 'mean_word_length': 7.407407407407407, 'pattern_counts': {'":': 2, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '111361', 'license': 'Apache-2.0', 'n_tokens_mistral': 2085, 'n_tokens_neox': 2008, 'n_words': 327, 'path': 'applications/solvers/cokeCombustionFoam/SegregatedSteps/runs/complicatedPorousMedia/combustions/optimize/compare.ipynb', 'repo_name': 'anoldfriend0718/openfoam', 'size': '5220'}