Constant

The Constant function returns a fixed value throughout the simulation. It is often used to supply a constant input (e.g., temperature threshold, fixed growth rate, photoperiod sensitivity) to other models in APSIM-NG.

Overview

This function provides a simple way to input a value that does not change over time. It can be added wherever a numerical input is required and does not depend on environmental conditions, crop stage, or other simulation variables.

In APSIM-NG, Constant is widely used as a basic building block within more complex functions, or to define cultivar-specific constants (e.g., base temperature = 0 °C, leaf width = 10 mm). It implements the IFunction interface, making it compatible with any APSIM component that accepts functions as inputs.

Model Structure

This section describes how this model is positioned within the APSIM framework. It outlines the broader structural and computational components that define its role and interactions in the simulation system.

This model inherits structural and functional behaviour from the following core APSIM components:

Model Variables

This section lists the key variables that describe or control the behaviour of this component. Some variables can be adjusted by the user to modify how the model behaves (configurable), while others are calculated internally and can be viewed as model outputs (reportable). For a general explanation of variable types and how they are used within the APSIM Next Generation framework, see the Model Variables Overview.

Configurable and Reportable Properties

Property Type Description
FixedValue double The constant value to return
Units string Optional units associated with the value

Read-Only Reportable Properties

Property Type Description
Value double The constant value returned by the function

Processes and Algorithms

This section describes the scientific processes and algorithms represented by this component. Each process corresponds to a biological, physical, or chemical mechanism simulated during a model time step. Where appropriate, equations or conceptual summaries are provided to explain how the process operates within the APSIM Next Generation framework.

This function always returns the same value, specified by the user in the FixedValue property. It does not depend on any conditions or crop stages.

User Interface

Constant can be added as a child of any function-based node (e.g., PhaseLookupValue, MultiplyFunction, AddFunction) in the model tree. To use:

  1. Right-click the parent node.
  2. Select “Add Model…”.
  3. Search for “Constant” and select it.
  4. Enter the desired numeric value and optional units.

See Also