This commit is contained in:
jakob.schratter 2026-01-27 18:36:15 +01:00
commit 6da3ea1f2d
2 changed files with 7 additions and 8 deletions

View file

@ -434,7 +434,7 @@ double FEM_Matrix::ThermalConductivity(const int subdomain)
{ {
// ceramic mug // ceramic mug
case 0: case 0:
lambda = 6.0; // anything from 1 to 4 lambda = 10.0; // anything from 1 to 4
break; break;
// water // water
@ -682,7 +682,7 @@ double FEM_Matrix::Heat_transfer_coefficient(const int subdomain)
// air to air (Free Convection Gas - Free Convection Gas : U = 1 - 2 W/m2K (typical window, room to outside air through glass)) // air to air (Free Convection Gas - Free Convection Gas : U = 1 - 2 W/m2K (typical window, room to outside air through glass))
case 2: case 2:
alpha = 1.0; alpha = 15.0;
break; break;
default: default:

View file

@ -167,6 +167,7 @@ int main(int argc, char **argv )
uv[nodeIndex] = temperature[i]; uv[nodeIndex] = temperature[i];
} }
// ----- solve time step ----- // ----- solve time step -----
vector<double> G(Mdt.Nrows(), 0.0); vector<double> G(Mdt.Nrows(), 0.0);
Mdt.Mult(G, uv); // G = M/dt * u_{n} Mdt.Mult(G, uv); // G = M/dt * u_{n}
@ -188,17 +189,15 @@ int main(int argc, char **argv )
cout << "% of elements above temperature " << goal_temp << "ºC: " << percentage_temp_reached << endl; cout << "% of elements above temperature " << goal_temp << "ºC: " << percentage_temp_reached << endl;
time_count += dt; time_count += dt;
// ----- write the heat-flux, so openFOAM can read it // ----- compute and write the heat-flux, so openFOAM can read it
// TODO: COMPUTE THE HEAT-FLUX FROM THE NEW uv TEMPERATURE SOLUTION
// "computeHeatFlux(heatFlux)"
for (int i = 0; i < numberOfVertices; ++i) for (int i = 0; i < numberOfVertices; ++i)
{ {
heatFlux[i] = 300.0; int nodeIndex = wetNodes[i];
heatFlux[i] = 15.0*(uv[nodeIndex] - 31.0); // alpha is assumed 15.0 regardless of material
} }
participantSolid.writeData("Solid-Mesh", "Heat-Flux", vertexIDs, heatFlux); participantSolid.writeData("Solid-Mesh", "Heat-Flux", vertexIDs, heatFlux);
// ----- advance preCICE ----- // ----- advance preCICE -----
participantSolid.advance(dt); participantSolid.advance(dt);