Main Content

When to Define a New Physical Domain

A physical domain provides an environment, defined primarily by its Across and Through variables, for connecting the components in a Physical Network. Component nodes are typed by domain, that is, each component node is associated with a unique type of domain and can be connected only to nodes associated with the same domain.

You do not need to define a new physical domain to create custom components. Simscape™ software comes with several predefined domains, such as mechanical translational, mechanical rotational, electrical, and so on. These domains are included in the Foundation library, and are the basis of Simscape Foundation blocks, as well as those in Simscape add-on products (for example, Simscape Fluids™ or Simscape Electrical™ blocks). If you want to create a custom component to be connected to the standard Simscape blocks, use the Foundation domain definitions. For a complete listing of the Foundation domains, see Foundation Domain Types and Directory Structure.

You need to define a new domain only if the Foundation domain definitions do not satisfy your modeling requirements. For example, to enable modeling electrochemical systems, you need to create a new domain with the appropriate Across and Through variables. For an example, see Case Study — Electrochemical Library.

Once you define a custom physical domain, you can use it for defining nodes in your custom components. These nodes, however, can be connected only to other nodes of the same domain type. For example, if you define a custom electrochemical domain as described above and then use it when creating custom components, you will not be able to connect these nodes with the regular electrical ports of the standard Simscape blocks, which use the Foundation electrical domain definition.

Related Topics