Resolution with Feel++

The meshes we used have been generated with Gmsh [24] with transfinite lines and surfaces.

During the project, we used a very fine mesh. This gave rise to particularly long computation times. At the start of the internship, I had resolved to continue with such meshes until I realized that Chen and Xu were using rather coarse meshes. It was at this point that I noticed that the Feel++ function I was using to calculate the distance to the edges returned false results when the mesh is large. So I had to use my own function even if this considerably increased the computation times since it is used at each step and not just once like the Feel++ function.

For all examples we used Galerkin least squares (GLS) finite element method [13], in which residuals in least-squares form are added to the standard Galerkin variational equation. An important feature of GLS methods is the introduction of a local mesh parameter that may be designed to provide accurate solutions with relatively coarse meshes.

Here are the options I used in the cfg file for the Feel++ heat-fluid toolbox:

case.dimension=2

[fluid]
use-semi-implicit-time-scheme=1 #Option for the use of extrapolation
use-natural-convection=1
Boussinesq.ref-temperature=289.15

[heat-fluid.fluid]
solver=Oseen #Oseen,Picard,Newton
define-pressure-cst=1
stabilization-gls=1 #Option for the use of the GLS stabilization
pc-type=lu #gasm,lu,fieldsplit,ilu

[heat-fluid.heat]
stabilization-gls=1
pc-type=lu
define-pressure-cst=1

1. Natural convection

In this case, I used

"Models": {
        "use-model-name": 1,
        "fluid": {
            "equations": "Navier-Stokes"
        }
    },
    "Parameters": {
        "dist2wall": "min(min(7.9-x),min(y, 2.5-y)):x:y",
        "mu_t": "0.03874*materials_Fluid_rho*sqrt(fluid_beta_u_0^2+fluid_beta_u_1^2)*dist2wall:materials_Fluid_rho:dist2wall:fluid_beta_u_0:fluid_beta_u_1"
    },
    "Materials": {
        "Fluid": {
            "rho": "1.22",
            "mu": "mu_t+1.798e-5:mu_t",
            "k": "2.6038",
            "Cp": "1005",
            "beta": "1/289.15"
        }
    }

in the toolbox json file.

The boundary conditions for velocity are homogeneous Dirichlet (\(u=0\)) for all walls.

The boundary conditions for temperature are Dirichlet for the hot (\(T=293.15\)) and cold (\(T=285.15\)) walls and homogeneous Neumann for adiabatic walls.

The command to launch the toolbox is:

mpirun -np 25 feelpp_toolbox_heatfluid --config-file natural_conv.cfg
  • Time step \(\Delta t\) is 3 seconds.+

  • Final time is 400 seconds.

  • The calculation time is approximately 30 seconds.

2. Forced advection

In this case, the room is isothermal, so I used the Feel++ fluid toolbox with these options in the cfg file:

case.dimension=2

[fluid]
solver=Oseen #Oseen,Picard,Newton
stabilization-gls=1 #Option for the use of the GLS stabilization
pc-type=lu #gasm,lu

I used

"Models": {
        "equations": "Navier-Stokes"
    },
    "Parameters": {
        "ubar": "0.6716771216", //Inlet air speed
        "dist2wall": "min(min(x,6-x),min(y,2-y)):x:y",
        "mu_t": "0.03874*materials_Omega_rho*dist2wall*sqrt(fluid_beta_u_0^2+fluid_beta_u_1^2):fluid_beta_u_0:fluid_beta_u_1:dist2wall:materials_Omega_rho"
    },
    "Materials": {
        "Omega": {
            "rho": "1.207",
            "mu": "mu_t+1.816e-5:mu_t"
        }
    }

in the toolbox json file.

The inlet air speed is calculated as follows:

\[ \mathrm{ubar} = \frac{\mu \mathrm{Re}}{\rho h} = \frac{5000\mu}{0.056\times \rho H}\]

The boundary conditions for velocity are Dirichlet for air supply outlet (\(u=(\mathrm{ubar}, 0)\)) and for exhaust inlet (\(u=0\)), and homogeneous Neumann for the walls.

The command to launch the toolbox is:

mpirun -np 25 feelpp_toolbox_fluid --config-file forced_adv.cfg
  • Time step \(\Delta t\) is 2.5 seconds.

  • Final time is 780 seconds.

  • The calculation time is approximately 57 seconds.

3. Mixed advection

In this case, I used the same parameters and materials as in the case of natural convection.

The boundary conditions for velocity are the same as in the case of forced advection.

The boundary conditions for temperature are Dirichlet for the hot wall and homogeneous Neumann for adiabatic walls.

The hot wall temperatures were calculated as follows:

\[ T_{hot} = \frac{\mu^2\mathrm{Re}^2\mathrm{Ar}}{g\beta h^3 \rho^2} + 289.15\]

The command to launch the toolbox is:

mpirun -np 25 feelpp_toolbox_heatfluid --config-file mixed.cfg
  • Time step \(\Delta t\) is 5 seconds.+

  • Final time is 1800 seconds for the lowest temperature and 900 seconds for the highest.

  • The calculation time is approximately 45 for the highest temperature to 90 seconds for the lowest.

References

  • [13] Thomas JR Hughes, Leopoldo P Franca, and Gregory M Hulbert. A new finite element formulation for computational fluid dynamics : Viii. the galerkin/least-squares method for advective-diffusive equations. Computer Methods in Applied Mechanics and Engineering, 73(2) :173–189, 1989.

  • [24] Wikipedia - «Gmsh»