Main Content

How to Define a New Physical Domain

To define a new physical domain, you must declare the Through and Across variables associated with it. For more information, see Basic Principles of Modeling Physical Networks.

A domain file must begin with the domain keyword, followed by the domain name, and be terminated by the end keyword.

In the declaration section of a domain file, two declaration blocks are required:

  • The Across variables declaration block, which begins with the variables keyword and is terminated by the end keyword. It contains declarations for all the Across variables associated with the domain. A domain model class definition can contain multiple Across variables, combined in a single variables block.

  • The Through variables declaration block, which begins with the variables(Balancing = true) keyword and is terminated by the end keyword. It contains declarations for all the Through variables associated with the domain. A domain model class definition can contain multiple Through variables, combined in a single variables(Balancing = true) block.

For more information on declaring the Through and Across variables, see Declare Through and Across Variables for a Domain.

A domain file can also include:

  • A parameters declaration block. This block contains declarations for domain parameters. These parameters are associated with the domain and can be propagated through the network to all components connected to the domain. For more information, see Working with Domain Parameters.

  • An intermediates declaration block. For more information, see Declaring and Using Named Intermediate Terms.

  • An equations section. Use the domain equations when your custom domain has more Across variables than Through variables. For more information, see Domain Equations.

For an example of a domain file, see Declare a Mechanical Rotational Domain.

Related Topics