Arcane  4.1.15.0
User documentation
Loading...
Searching...
No Matches
The "Poisson" Application

The second example of this tutorial allows the development of a module that calculates a numerical diffusion of heat following Poisson's equation in a parallelepiped. The module must initialize all cells with a constant temperature. This temperature is read from the dataset which also provides boundary temperatures on the surfaces XMIN and ZMIN of the mesh. The temperature on the boundary faces is taken into account by initializing the temperature of the nodes located on these faces. Then, the module calculates the diffusion:

  • the temperature of a cell at time n+1 is the average of the temperatures of its nodes at time n,
  • the temperature of a node at time n+1 is the average of the temperatures of its cells at time n+1.

The calculation must stop when the largest temperature difference (between times n and n+1) on a cell is less than 0.2. This difference will be stored in a local variable named max_delta_cell_t.

Variables

Prerequisites
Actions to perform
  • Complete the file Poisson.axl to declare the variables CellTemperature and NodeTemperature representing the temperatures of the cells and the nodes, respectively.
  • Compile.
  • Look at the declaration of the variables ArcanePoissonObject::m_cell_temperature and ArcanePoissonObject::m_node_temperature in the file Poisson_axl.h

Data File

Prerequisites
Actions to perform
  • Edit the dataset Poisson.arc and observe the elements init-temperature and boundary-condition.
  • Define the grammar of this data by completing the descriptor of the module Poisson.axl (element options)

Iterating over Mesh Entities

Prerequisites
Actions to perform
  • Complete the file PoissonModule.cc by performing the calculations described in the exercise statement
  • Compile using the provided Makefile files
  • Run sequentially. The output files are in Ensight Gold format; visualize them (if possible!)

Parallelism

Prerequisites
Actions to perform
  • Run in parallel and visualize the result
  • Correct diffusion errors by synchronizing the temperature and the variable max_delta_cell_t
  • Run in parallel and visualize the result