Rui Wan commited on
Commit ·
c23f1ad
1
Parent(s): 2d66fdd
update
Browse files
__pycache__/Dataset.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/Dataset.cpython-312.pyc and b/__pycache__/Dataset.cpython-312.pyc differ
|
|
|
__pycache__/model_inverse.cpython-312.pyc
ADDED
|
Binary file (10.9 kB). View file
|
|
|
app.py
CHANGED
|
@@ -258,7 +258,7 @@ if st.session_state.AM_input_changed == True:
|
|
| 258 |
st.session_state.AM_design_button_clicked = False
|
| 259 |
st.session_state.AM_input_changed = False
|
| 260 |
|
| 261 |
-
st.button("Injection molding process design",
|
| 262 |
if st.session_state.AM_design_button_clicked == True:
|
| 263 |
st.write("Process parameters")
|
| 264 |
data1 = pd.DataFrame({
|
|
@@ -281,10 +281,10 @@ if st.session_state.AM_design_button_clicked == True:
|
|
| 281 |
best = inverse_design(gate_loc=1, matrix='PP', fiber='GF', fiber_vf=0.1, y_target=np.array([angleA, angleB, angleC]), n_restarts=5, epochs=100, use_lbfgs=True)
|
| 282 |
|
| 283 |
data2 = pd.DataFrame({
|
| 284 |
-
'Packing pressure (MPa)': best["input"][0],
|
| 285 |
-
'Packing time (s)': best["input"][1],
|
| 286 |
-
'Mold temperature (C)': best["input"][2],
|
| 287 |
-
'Injection speed (cm^3/s)': best["input"][3]
|
| 288 |
})
|
| 289 |
st.dataframe(data2, hide_index=True, width=600)
|
| 290 |
|
|
@@ -298,5 +298,3 @@ if st.session_state.AM_design_button_clicked == True:
|
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
-
|
| 302 |
-
|
|
|
|
| 258 |
st.session_state.AM_design_button_clicked = False
|
| 259 |
st.session_state.AM_input_changed = False
|
| 260 |
|
| 261 |
+
st.button("Injection molding process design", on_click=AM_design_click)
|
| 262 |
if st.session_state.AM_design_button_clicked == True:
|
| 263 |
st.write("Process parameters")
|
| 264 |
data1 = pd.DataFrame({
|
|
|
|
| 281 |
best = inverse_design(gate_loc=1, matrix='PP', fiber='GF', fiber_vf=0.1, y_target=np.array([angleA, angleB, angleC]), n_restarts=5, epochs=100, use_lbfgs=True)
|
| 282 |
|
| 283 |
data2 = pd.DataFrame({
|
| 284 |
+
'Packing pressure (MPa)': [best["input"][0]],
|
| 285 |
+
'Packing time (s)': [best["input"][1]],
|
| 286 |
+
'Mold temperature (C)': [best["input"][2]],
|
| 287 |
+
'Injection speed (cm^3/s)': [best["input"][3]]
|
| 288 |
})
|
| 289 |
st.dataframe(data2, hide_index=True, width=600)
|
| 290 |
|
|
|
|
| 298 |
|
| 299 |
|
| 300 |
|
|
|
|
|
|