## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Use of thermal property

When a thermal command ID is detected in the input data, it will store the relevant thermal properties within the material properties (host) array. The positions used for this are `70-74`.

## C++

    double hexp  = data.p_cmat[70];    // Heat expansion coefficient
    double Cp    = data.p_cmat[71];    // Thermal heat capacity
    double hcond = data.p_cmat[72];    // Thermal conductivity
    double k     = data.p_cmat[73];    // Taylor-Quinney coefficient
    double Tref  = data.p_cmat[74];    // Reference temperature for heat expansion

## CUDA

Since we’re using `__constant__` memory that resides in file scope, we can access the array directly from the kernel.

    double hexp  = cmat[70];    // Heat expansion coefficient
    double Cp    = cmat[71];    // Thermal heat capacity
    double hcond = cmat[72];    // Thermal conductivity
    double k     = cmat[73];    // Taylor-Quinney coefficient
    double Tref  = cmat[74];    // Reference temperature for heat expansion