Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6251617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:38:52+00:00 2026-05-24T13:38:52+00:00

I would like to model an explictly time dependent differential equation in Modelica. Say

  • 0

I would like to model an explictly time dependent differential equation in Modelica.

Say I would like to model

Real x(start=1);
der(x) = t;

in Modelica. What is the correct way to access the time variable t?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:38:53+00:00Added an answer on May 24, 2026 at 1:38 pm

    The time variable in Modelica is called time and it is accessible in any model or block (but not packages, record, connectors or functions).

    Also, instead of using the start attribute I suggest using initial equations. So your complete model would look like this:

    model FirstOrder
      Real x;
    initial equation
      x = 1;
    equation
      der(x) = time;
    end FirstOrder;
    

    The equations in the initial equation section are only applied to solve for initial values of states. The equation shown above is trivial, but you can do interesting stuff like:

    model FirstOrder_IC2
      Real x;
    initial equation
      x*x*x = 3.0*time+7.0;
    equation
      der(x) = time;
    end FirstOrder_IC2;
    

    The point here is that you can use other equations besides ones that directly specify the value of the state. The above initial equation is not “physically” interesting, but mathematically it is because it is both non-linear and time-varying (i.e. sensitive to the start time of the simulation).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to keep model binding when doing ajax calls from my view.
I would like to create model binding functionality so a user can enter ','
I would like to create a Group model in Google App Engine and then
I would like to add a field to the Django FlatPage database model, but
I would like to store large dataset generated in Python in a Django model.
I would like to inject a dependency into an ASP.NET MVC model, but I
I would like to do some exercice and apply DDD to my Domain Model
I have an ActiveRecord model that I would like to convert to xml, but
I have DirectX .x files and I would like to display the model in
I have a DateTimeField called created in my model and I would like to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.