SPARTA WWW Site - SPARTA Documentation - SPARTA Commands

fix surf/temp command


fix ID surf/temp surf-ID Nevery source Tsurf emisurf customID 


compute 1 surf all all etot
fix 1 surf/temp all 1000 c_1 250 0.9 temperature 

surf_collide 1 diffuse s_temperature 0.5


Compute a new temperature for each surface element in the group once every Nevery steps. This command uses a compute or fix ID which should compute the flux of total energy onto each surface elements, e.g. etot from the compute surf command. Note that SPARTA does not check that the compute/fix specified calculates an energy flux.

This fix creates a custom per-surf vector with the specified name of customID. It can be accessed by other commands which use the current temperature of surface elements. An example is the surf_collide diffuse command.

The per-surface element temperatures computed by this fix can be output via the dump surf command, using the s_name syntax to output the custom temparture variable created by this fix. See the examples/adjust_temp dir for scripts that use this fix.

The specified group-ID must be the name of a surface element group, as defined by the group surf command, which contains a set of surface elements.

The specfied Nevery determines how often the surface temperatures are re-computed.

The source can be specified as a per-surf quantity calculated by a compute, such as the compute surf command. Or it can be specified a per-surf quantity calculated by a fix, e.g. one which performs time-averaging of per-surf quantities, such as fix ave/surf.

If the specified source has no bracketed term appended, the compute or fix must calculate a per-surf vector. If c_ID[I] or f_ID[I] is used, then I must be in the range from 1-M, which will use the Ith column of the M-column per-surf array calculated by the compute or fix.

The temperature of the surface element is calculated from the Stefan-Boltzmann law for a gray-body, which states that

q_wall = sigma * emisurf * Tsurf^4 

where q_wall is the heat flux to the surface (provided by the compute or fix), sigma is the Stefan-Boltzmann constant appropriate to the units being used, emisurf is the surface emissivity, and Tsurf is the resulting surface temperature.

The specified emissivity emisurf is a unitless coefficient > 0.0 and <= 1.0, which determines the emissivity of the surface. An emissivity coefficient of 1.0 means the surface is a black-body that radiates all the energy it receives.

The specified Tsurf value is used to set the initial temperature of every surface element in the system. The temperature values for only surface elements in the surf-ID group will be reset every Nevery timesteps by the formula above. The the temperature values for surfaces not in the surf-ID group will always be Tsurf.

Note that these temperature values are stored in a custom per-surf vector. The commands that use these values determine whether they access only surface element values in the surf-ID group or others as well. E.g. the surf_collide diffuse command can also be assigned to a group of surface elements via the surf_modify command. If the same surface group ID and same custom per-surf vector name is used for both surf_collide diffuse and this command, then only surface elements with time-varying temperatures set by this fix will be accessed for surface collision calculations.

It is also possible to defined multiple surf_collide diffuse and fix surf/temp commands could be defined, each pair of which use a different surface group and different custom per-surf vector name.

Restart, output info:

This fix writes its per-surf temperatures values to the restart file. If the restart input script defines this fix after a restart file has been read, the temperature values should be set to the restart file values.


Currently this fix can only be used in simulations that define explicit non-distributed surfaces. Support for distributed or implicit surfaces may be added at a later time.

Related commands: none

Default: none