Solved

Convertion unit MW --> MWh

  • 1 March 2021
  • 4 replies
  • 69 views

Hi everybody, I am trying to convert the unit power [MW] into the unit energy [MWh] considerung the specific time duration per timestamp [h] or [qh]. Has anyone an idea how to solve that?

icon

Best answer by mohansx 3 March 2021, 22:20

@JonathanSchade 

 

Thanks, I understand better now. One remark, shouldn’t the unit of K_Boiler be Euro/h as you are multiplying MW with Euro/MWh ?

 

So, the derived unit kWh or MWh in the SI_Energy is not considering at as a product of the SI_Power unit MW and time unit h (hour) but just a conversion from J. 

What you can do is, forget about the SI_Energy quantity and declare the MWh yourself as a unit parameter (read more here: Unit-valued Parameters — AIMMS Language Reference)

In SI_Time_Duration, you can add a conversion to hours as 3600s. You add a conversion in SI_Power quantity for MW as 10^6 * W.

Now declare a unit parameter named MWh with definition as MW*hour. Use this MWh in your variable and parameter declarations. 

 

 

View original

4 replies

Userlevel 5
Badge +2

@JonathanSchade 

 

If you have the SI_Units for Power and Energy, then you will already have derived conversions in the Energy declaration. kWh will be available and you can declare a kkWh or MWh as you need. 

 

These are the unit declarations I have 

 

Quantity SI_Energy {

    BaseUnit: J = kg*m^2/s^2;

    Conversions: {

        MWh ->J : #-># * 3600000000,

        MWqh->J : #-># * 900000000

    }

    Comment: "Expresses the value for the capacity to do work.";

}


Quantity SI_Power {

    BaseUnit: W = kg*m^2/s^3;

    Conversions: MW->W : #-># * 1000000;

    Comment: "Expresses the value for the amount of energy per time unit.";

}


Quantity SI_Time_Duration {

    BaseUnit: s;

    Conversions: qh->s : #-># * 900;

    Comment: "Expresses the value for the duration of periods.";

}

 

To get MWqh you could adjust the scaling factor with /4. Does this help ?

You can also review AIMMS Academy: Units of Measurement

Hello Mohan, thank you for your help. I defined the quantitys as suggested. But it seems, that the time per timestap (hour) is still not considered. That’s the original Problem:

 

 

Userlevel 5
Badge +2

@JonathanSchade 

 

Thanks, I understand better now. One remark, shouldn’t the unit of K_Boiler be Euro/h as you are multiplying MW with Euro/MWh ?

 

So, the derived unit kWh or MWh in the SI_Energy is not considering at as a product of the SI_Power unit MW and time unit h (hour) but just a conversion from J. 

What you can do is, forget about the SI_Energy quantity and declare the MWh yourself as a unit parameter (read more here: Unit-valued Parameters — AIMMS Language Reference)

In SI_Time_Duration, you can add a conversion to hours as 3600s. You add a conversion in SI_Power quantity for MW as 10^6 * W.

Now declare a unit parameter named MWh with definition as MW*hour. Use this MWh in your variable and parameter declarations. 

 

 

@JonathanSchade

 

Thanks, I understand better now. One remark, shouldn’t the unit of K_Boiler be Euro/h as you are multiplying MW with Euro/MWh ?

 

So, the derived unit kWh or MWh in the SI_Energy is not considering at as a product of the SI_Power unit MW and time unit h (hour) but just a conversion from J. 

What you can do is, forget about the SI_Energy quantity and declare the MWh yourself as a unit parameter (read more here: Unit-valued Parameters — AIMMS Language Reference)

In SI_Time_Duration, you can add a conversion to hours as 3600s. You add a conversion in SI_Power quantity for MW as 10^6 * W.

Now declare a unit parameter named MWh with definition as MW*hour. Use this MWh in your variable and parameter declarations. 

 

 

It worked! Thank you very much :)

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator