Skip to main content

Part of the book series: The Springer International Series in Engineering and Computer Science ((SECS,volume 615))

  • 970 Accesses

Abstract

While writing equations (i.e., equating two expressions) is sufficient for most modeling, there are cases where a procedural or algorithmic approach, involving explicit assignment, is necessary. To address this need, Modelica includes support for algorithmic functions. While a function in Modelica is like a block because all quantities must be explicitly labeled as either input or output, it is different from a block or model because it is not connected to other components. Instead, it is invoked during the evaluation of expressions. Another difference between a function and a block or model is that a function is not allowed to have any persistent internal state. As a result, there are several restrictions on the statements which can appear within a function (e.g., the der operator cannot appear within a function).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer Science+Business Media New York

About this chapter

Cite this chapter

Tiller, M. (2001). Functions. In: Introduction to Physical Modeling with Modelica. The Springer International Series in Engineering and Computer Science, vol 615. Springer, Boston, MA. https://doi.org/10.1007/978-1-4615-1561-6_5

Download citation

  • DOI: https://doi.org/10.1007/978-1-4615-1561-6_5

  • Publisher Name: Springer, Boston, MA

  • Print ISBN: 978-1-4613-5615-8

  • Online ISBN: 978-1-4615-1561-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics