as
This commit is contained in:
parent
9afdebd128
commit
6da3ea1f2d
2 changed files with 7 additions and 8 deletions
|
|
@ -167,6 +167,7 @@ int main(int argc, char **argv )
|
|||
uv[nodeIndex] = temperature[i];
|
||||
}
|
||||
|
||||
|
||||
// ----- solve time step -----
|
||||
vector<double> G(Mdt.Nrows(), 0.0);
|
||||
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;
|
||||
time_count += dt;
|
||||
|
||||
// ----- write the heat-flux, so openFOAM can read it
|
||||
// TODO: COMPUTE THE HEAT-FLUX FROM THE NEW uv TEMPERATURE SOLUTION
|
||||
// "computeHeatFlux(heatFlux)"
|
||||
// ----- compute and write the heat-flux, so openFOAM can read it
|
||||
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);
|
||||
|
||||
|
||||
// ----- advance preCICE -----
|
||||
participantSolid.advance(dt);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue