The project generates heat equation solution using Finite Element Analysis. This data is used to finetune IBM Granite to interpret heat equation solutions (given in a .vtk format file).
- Finite Element Method for data generation
- Unit square grid: 25 x 25 points
- 30 different .vtk files generated
- 4 questions per file, totaling 120 questions
-
Corner Temperature Inquiry
Analyze the given steady-state heat equation solution, saved in the format: Coordinates (x,y): Temperature at (x,y) And then tell - What is the temperature distribution at the corner (0, 0) of the unit square mesh? -
X-Axis Temperature Variation
Analyze the given steady-state heat equation solution, saved in the format: Coordinates (x,y): Temperature at (x,y) And then tell - How does the temperature change with respect to the position along the x-axis at y = 0.5? -
Maximum Temperature Location
Analyze the given steady-state heat equation solution, saved in the format: Coordinates (x,y): Temperature at (x,y) And then tell at what coordinates does the maximum temperature occur. -
Temperature Decay Analysis
Analyze the given steady-state heat equation solution, saved in the format: Coordinates (x,y): Temperature at (x,y) And then tell - What can you infer about the decay rate of temperature?
The given code was used to generate relevant responses -
def solve(temp):
answers = [
f"The answer is {get_temperature(temp, 0.0, 0.0)}.",
f"The answer is {temp[np.isclose(temp['y'], 0.5, atol=1e-2)]['Temperature'].mean()}.",
f"The answer is {temp.loc[temp['Temperature'].idxmax(), 'x'], temp.loc[temp['Temperature'].idxmax(), 'y']}.",
"The decay rate of temperature seems constant since the information about time is not given."
]
return answersThe training data can be found here - training_data. This dataset was later used to combine vtk data and prompts/questions to make vtk_training_data.csv
- Create DataFrame with prompts and responses
- Prepare data for LLM fine-tuning
- heat-wave-equation-data-generation.ipynb: Data generation
- interpreting-heat-wave-equation-using-llm.ipynb: LLM fine-tuning pipeline