tweaked parameters to be more realistic -> coffee cup cools down early (as expected)

This commit is contained in:
jakob.schratter 2026-01-28 11:36:32 +01:00
commit 5ae5e5ed03
5 changed files with 10742 additions and 10731 deletions

View file

@ -42,7 +42,7 @@ int main(int argc, char **argv )
// ##########################################
double dt = 1.0; // time step
int steps = 100; // number of time iterations
int max_it = 300; // number of time iterations
double u_out = 18.0;
// ##########################################
@ -157,8 +157,10 @@ int main(int argc, char **argv )
goal_perc = 60.0;
double time_count = 0;
//while (average_coffee_temperature > goal_temp)
while (percentage_temp_reached > goal_perc)
int step = 0;
while (average_coffee_temperature > goal_temp && step < max_it)
//while (percentage_temp_reached > goal_perc)
for(int i = 0; i < 100; ++i)
{
preciceDt = participantSolid.getMaxTimeStepSize();
solverDt = 1.0;
@ -199,7 +201,7 @@ int main(int argc, char **argv )
for (int i = 0; i < numberOfVertices; ++i)
{
int nodeIndex = wetNodes[i];
heatFlux[i] = 15.0*(uv[nodeIndex] - 31.0); // alpha is assumed 15.0 regardless of material
heatFlux[i] = 30.0*(uv[nodeIndex] - 31.0); // alpha is assumed for air material at the top
}
participantSolid.writeData("Solid-Mesh", "Heat-Flux", vertexIDs, heatFlux);
@ -209,6 +211,7 @@ int main(int argc, char **argv )
time_count += dt;
++step;
}
auto t4 = system_clock::now(); // stop timer
auto duration = duration_cast<microseconds>(t4 - t3); // duration in microseconds
@ -220,6 +223,7 @@ int main(int argc, char **argv )
participantSolid.finalize();
mesh_c.Visualize(uv);
return 0;
}

File diff suppressed because it is too large Load diff