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

  • Home
  • SEARCH
  • 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 6224403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:39:58+00:00 2026-05-24T08:39:58+00:00

I want to create a new medium model in Modelica. All medium model have

  • 0

I want to create a new medium model in Modelica. All medium model have a type temperature with min, max, start and nominal attribute. I would like to set the minimum temperature to the value stored in fluidLimits.TMIN (which is an instance of a FluidLimits record) but I always get warnings stating that the min attribute is ignored, because it has a non-literal value. Writing min=Modelica.Constants.small instead works.
See the first lines of my medium model definition below:

partial package SomeMediumModel
  extends Modelica.Media.Interfaces.PartialTwoPhaseMedium(
    Temperature(min=fluidLimits.TMIN, max=600));

  constant FluidLimits fluidLimits;
  ...
end SomeMediumModel;

Is there an example of how to use the FluidLimits record?
What do I have to change in order to make min accept the value from fluidLimits.TMIN ?

  • 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-24T08:39:59+00:00Added an answer on May 24, 2026 at 8:39 am

    I’m not quite sure why this doesn’t work. It seems to me it should work since fluidLimits is a constant. I’m guessing FluidLimits is a record?

    It seems like a potential bug. I’d report it to your tool vendor and see what they say. In the meantime, a potential workaround would be to define a package like this:

    partial package SomeMediumModel
      extends Modelica.Media.Interfaces.PartialTwoPhaseMedium(
        Temperature(min=FluidLimitsPackage.TMIN, max=600));
    
      package FluidLimitsPackage
        constant Modelica.Constants.Temperature TMIN=275;
      end FluidLimitsPackage;
      ...
    end SomeMediumModel;
    

    I suspect the issue you are having is that the tool just doesn’t recognize that this is truly a constant. This approach (which is untested, BTW) might work around that. But in any case, you should definitely report it to your tool vendor to make sure they are aware of it.

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

Sidebar

Related Questions

I have a multidimensional array and I want to create new variables based on
I want to create new exception type to catch it with specify logging. But
I have following string. $option = '+'; $value = '100'; I want create new
I want to create new node of BeanTreeView, and when I add some node
I'm using Visual Basic 9 (VS2008) I want to create new Tabs as and
I want to create a new net.tcp://localhost:x/Service endpoint for a WCF service call, with
I want to create a new row in my database on a table that
I want to create a new object using Class::DBI. One of the fields of
I want to create a new business application using the Django framework. Any suggestions
I want to create a new Subversion repository through Aptana Studio. Both Aptana SVN

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.