warning

Disclaimer : This post is not finished and has NOT been fully reviewed. Feedback are welcome, but no arguments (yet) please!

heat

(A Bialetti Moka Express 3-Cup red coffee maker, Photo Stan RitterField) Heat conduction is essential for mankind. At cerfacs we can use AVTP 3.X to simulate these problems…

AVTP III, the In-house Cerfacs Solver

The solver AVTP is a spin-off from the Computational Fluid Dynamics Cerfacs code AVBP. The sources are however reduced to solve the thermal conduction problem. You can read more on the Versions 2.X on the dedicated website.

The version 3.0 is a major release, moving from custom ASCII input files to a more standard Fortran Namelist. You can read fortran-namelist-workedex to know why and how.

Installation

You need to compile sources, available in our Cerfacs Forge. Please contact F. Duchaine, G. Staffelbach, or A. Dauptain

Then set up your Shell environment variables

AVTP_HOSTTYPE=
AVTP_HOME=
PATH=$PATH:$AVTP_HOME/TOOLS/BIN/SCRIPTS
PATH=$PATH:$AVTP_HOME/HOST/$AVTP_HOSTTYPE/TOOLEXEC
PATH=$PATH:$AVTP_HOME/HOST/$AVTP_HOSTTYPE/AVTPEXEC

To compile the sources:

> cd $AVTP_HOME/SOURCES
> make clean ; make

To compile the tools

> cd $AVTP_HOME/SOURCES
> make clean ; compile

Setting up the simulation

Main controls

The run.params using a Fortran Namelist is very similar to an AVBP run.params, the only difference being the way blocks are started and stopped. This file gather all the main controls of the simulation.

&hpc_debug
    ncell_group = 400
    preprocessor = 1
/

&input_control
    asciibound_file = './MESH/bloup.asciibound'
    initial_solution_file = './INIT/bloup.init.h5'
    material_database = 'material_database.dat'
    mesh_file = './MESH/bloup.mesh.h5'
    probe_file = './bloup_record.dat'
    solutbound_file = './SOLUTBOUND/bloup.solutbound.h5'
    tab_species = 'FER_varie'
/

&output_average
    save_average = 'no'
    save_average_freq = 10
    save_average_name = './SOLUT/av'
    save_average_out = 3000
/

&output_control
    save_solution = 'yes'
    save_solution_additional = 'minimum'
    save_solution_name = './SOLUT/bloup'
    save_solution_time = 0.0001
    save_temporal = 'yes'
    save_temporal_balance = 'yes'
    save_temporal_dirname = './TEMPORAL/'
    save_temporal_iteration = 1
/

&preproc
    ichoice_nml = 1
    iolcomm_nml = 0
    iorder_nml = -1
    ippnode_nml = 1
    ireorder_nml = 1
    itghost_nml = 0
    ndum_nml = 0
/

&run_control
    diffusion_scheme = 'FE_2delta'
    fourier = 5
    implicit_conv_crit = 1e-06
    implicit_nb_it = 1000
    number_of_species = 1
    simulation_end_time = 0.001
    solver_type = 'implicit_CG'
/
Boundary conditions

Then comes the asciiBound file, again using namelists

&patch001
    patch_name_nml = 'outlet'
    boundary_condition = 'WALL_ISOT'
    target_origin = 'solutbound'
/

&patch002
    patch_name_nml = 'inlet'
    boundary_condition = 'WALL_ISOT'
    target_origin = 'solutbound'
/

&patch003
    patch_name_nml = 'wallup'
    boundary_condition = 'WALL_ISOT'
    target_origin = 'solutbound'
/

&patch004
    patch_name_nml = 'walldown'
    boundary_condition = 'WALL_ISOT'
    target_origin = 'solutbound'
/

&patch005
    patch_name_nml = 'walldroite'
    boundary_condition = 'WALL_ISOT'
    target_origin = 'solutbound'
/

&patch006
    patch_name_nml = 'wallgauche'
    boundary_condition = 'WALL_ISOT'
    target_origin = 'solutbound'
/

&patch007
    patch_name_nml = 'perfo'
    boundary_condition = 'WALL_FLUX'
    target_origin = 'solutbound'
/

Finally we have the solutBound file, a HDF5 binary file. We can have a short peek inside:

>h5cross tree  bloup.solutbound.h5 
Parameters:
  neqbnd:
    dtype: int64
    value: 2
Patch_001-outlet:
  TemperatureParoi:
    dtype: float64
    value: array of 922 elements
  patch_key:
    dtype: object
    value: null
Patch_002-inlet:
  TemperatureParoi:
    dtype: float64
    value: array of 930 elements
  patch_key:
    dtype: object
    value: null
Patch_003-wallup:
  TemperatureParoi:
    dtype: float64
    value: array of 144560 elements
  patch_key:
    dtype: object
    value: null
Patch_004-walldown:
  TemperatureParoi:
    dtype: float64
    value: array of 140621 elements
  patch_key:
    dtype: object
    value: null
Patch_005-walldroite:
  TemperatureParoi:
    dtype: float64
    value: array of 37287 elements
  patch_key:
    dtype: object
    value: null
Patch_006-wallgauche:
  TemperatureParoi:
    dtype: float64
    value: array of 37287 elements
  patch_key:
    dtype: object
    value: null
Patch_007-perfo:
  Flux:
    dtype: float64
    value: array of 48284 elements
  patch_key:
    dtype: object
    value: null

The file is storing the Targets for each Boundary condition, node-wise, for each patch.

The most common boundaries use the following Inputs

  • WALL_ISOT asks for a TemperatureParoi field in Kelvins.
  • WALL_FLUX asks for a Flux field in W/m2.
  • WALL_LOSS asks for TemperatureConv in Kelvin and the corresponding Hconv W/m2/K.

You can read more on the AVTP boundary conditions web page and, if you just trust no-one , jump to the source, in SOURCES/MASTER/read_patch.f90.

Like this post? Share on: TwitterFacebookEmail


Antoine Dauptain is a research scientist focused on computer science and engineering topics for HPC.

Keep Reading


Published

Category

Tutorials

Tags

Stay in Touch