Skip to content

Compute Average Heat Flux

Changes

The last Merge Request modified the get_loading function in the fluid wrapper so that it now returns the average load between the last FSI equilibrium state and the current state, rather than using only the current state. This change was motivated by the fact that the load communicated to Metafor remains constant throughout a coupling time step. Using the average load therefore provides a more accurate representation than relying solely on the final value. This merge request extends the same strategy to the get_heat_flux function, which has not been updated in the previous merge request.

Implementation

After reaching FSI equilibrium, the fluid load and heat flux are stored in dedicated variables called prev_load and prev_heatflux. When the methods get_loading or get_heatflux are called, the wrapper ensures that both mechanical and thermal coupling consistently use averaged values across the time step.

# get_loading

vector = w.VectorVectorDouble()
self.problem.getSolver().computeStress('FSI', self.FSI, vector)
return (np.array(vector)+self.prev_loading)/2
# get_heatflux

vector = w.VectorVectorDouble()
self.problem.getSolver().computeHeatFlux('FSI', self.FSI, vector)
return (np.array(vector)+self.prev_heatflux)/2

The battery is passing.

Edited by Lacroix Martin

Merge request reports

Loading