The goal here is to set up a stationary test case, this time taking thermal effects into account. To do so, we will start again from the stationarycase guide, to which we will add heating on the vertical lateral walls; the velocity imposed on the top wall will, for its part, be removed.
We then expect to obtain a single large vortex at the center of the cavity.
Expected stationary state for a flow in a square cavity with a temperature difference imposed between the two vertical walls
In order to take thermal effects into account, it is necessary to add the energy equation to the previous problem. There are several ways to account for it depending on the density ratio between the hottest temperature and the coldest temperature, \(\frac{\Delta \rho}{\rho_m}\).
If \(\frac{\Delta \rho}{\rho_m} < 0.1\) => Boussinesq approximation
- The physics solved: the energy equation is activated using the keyword Pb_Thermohydraulique.
- The fluid properties: the physical properties are constant except for the density in the gravity term. The physical properties \(\rho_m\), \(\nu_m\) and \(C_{p,m}\) are then computed with the mean temperature \(T_m\).
- Note
- The Boussinesq approximation contains a term in \((T_m - T_0)\beta\). In order to avoid a sign change in this term, it is recommended to take for \(T_0\) the coldest temperature of the problem, and not the initial temperature, otherwise numerical problems may appear.
If, during the computation, an overestimation of the velocities is observed, these can be modulated via this term.
With this approximation, an error of 10% on the dilatability of the fluid is accepted.
- As for the other steps — namely the mesh, the various schemes, etc. — the recommendations are the same as for the stationary case guide.
If \(\frac{\Delta \rho}{\rho_m} > 0.1\) => Quasi-compressible
- The physics solved: the energy equation is then activated using the keyword Pb_Thermohydraulique_QC.
- The fluid properties: to define the fluid properties, there are several possibilities: either define a perfect gas, or define a real gas, or define \(\rho\) as a function of the temperature — a polynomial, for example. If this last possibility is chosen, it will nonetheless be necessary to ensure that the pressure is constant, at the risk otherwise of seeing errors appear on the physical properties.
- As for the other steps — namely the mesh, the various schemes, etc. — the recommendations are the same as for the stationary case guide.