maths / moodle-qtype_stack

Stack question type for Moodle
GNU General Public License v3.0
140 stars 148 forks source link

Issue 537 "Reactive Power [VA] as Unit #537" possibly not solved #605

Closed jensfortmann closed 3 years ago

jensfortmann commented 4 years ago

A) Unit VA not accepted? The Reactive Power Unit [VA] does not seem to be accepted (any more?) in the current release. Entering "2000 kVA" using Units.m leads to an error Message ("Your answer is not valid. You answer needs to contain units,...") Entering "2000 kV*A" is accepted as anwer, but the answer is declared to be wrong. ("Wrong, the right answer would be 2000 kVA")

B) Equivalence VA - W

The definition in casstring.units.class.php (array('VA', '(kg*m^2)/(s^3)', 'VA', 'volt-ampere')) may be problematic because it suggests and equivalence between VA and W - which would be correkt for DC currents and voltages only, but not for AC systems.

sangwinc commented 4 years ago

(A) Did you re-create your maxima images etc.? This is needed to propagate the fix into the Maxima side of things. I did a test, and 2000kVA works for me. I'll add in a unit test to make sure!

(B) Ok, well I'm rapidly realising that I don't know physics! Please could you help explain what STACK "should" do with VA?! Does a teacher need an AC/DC context setting perhaps?

sangwinc commented 4 years ago

(A) I think VA is in the units system, see https://github.com/maths/moodle-qtype_stack/blob/master/tests/fixtures/answertestfixtures.class.php#L1684

jensfortmann commented 4 years ago

Please see my response below

BR, Jens

Von: Chris Sangwin notifications@github.com Gesendet: Dienstag, 14. Juli 2020 14:12 An: maths/moodle-qtype_stack moodle-qtype_stack@noreply.github.com Cc: Jens Fortmann jens.fortmann@htw-berlin.de; Author author@noreply.github.com Betreff: Re: [maths/moodle-qtype_stack] Issue 537 "Reactive Power [VA] as Unit #537" possibly not solved (#605)

(A) Did you re-create your maxima images etc.? This is needed to propagate the fix into the Maxima side of things. I did a test, and 2000kVA works for me. I'll add in a unit test to make sure!

=> I will check with our admin

(B) Ok, well I'm rapidly realising that I don't know physics! Please could you help explain what STACK "should" do with VA?! Does a teacher need an AC/DC context setting perhaps?

=> I can try. The main idea is to find a simple description an AC voltage and current described as

u(t) = û sin(omegat + phi_u) and i(t) = î sin(omegat + phi_i) containing three variable quantities for each equation, amplitude û , frequency f (as part of omega = 2 pi f) and the phase deviation phi.

If we assume

a. the same frequency for both voltage and current (otherwise no active/real power is transferred). b. a (rather) constant frequency, which is common for power systems

the number of variables per equation is only 2, amplitude and phase angle. Using a complex representation, with magnitude (= amplitude) and phase angle (or real and complex component), mathematics become rather easy.

Multiplying two complex components (U,I) leads to a complex Power definition

S = U x conj(I), with S, U and I being complex variables, with S = P + jQ , with S as apparent power, P as active power (voltage and current in phase) and Q as reactive power (voltage an current 90° out of phase). The reactive power Q for a single phase oscillates with 100 Hz it leads to higher losses (P = I² x R), but does not contribute to power transport (its sum is zero over one period,)

The reactive power is important, without reactive power there would be no voltage, without voltage I would not be able to generate a current.

You can find a mathematical description at Wikipedia ( https://en.wikipedia.org/wiki/Phasor https://en.wikipedia.org/wiki/Phasor), but it is rather detailed. Most descriptions I found assume a lot of background knowledge...

Where it touches moodle/Stack are the units: active power (P = real part of S ) is described in W (P = S x cos(phi)), the reactive power with VA (Q = imaginary part of S).

I agree that these definitions are not really helpful since for DC currents VxA =P , so it is important to add if we refer to AC or DC components.

I hope this helps a little.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maths/moodle-qtype_stack/issues/605#issuecomment-658144263 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFQGELLXLW5U5PSNTHLR33R3RDSPANCNFSM4OUINPNA . https://github.com/notifications/beacon/AOFQGEN6PIEOTF5TBMGMWODR3RDSPA5CNFSM4OUINPNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE45HYBY.gif

jensfortmann commented 4 years ago

“(A) Did you re-create your maxima images etc.? This is needed to propagate the fix into the Maxima side of things. “

==>Could you perhaps send me a link to the documentation to see what happens once we start this? We are in the exam period would like to avoid unexpected side effects…

BR, Jens

Von: Jens Fortmann jens.fortmann@HTW-Berlin.de Gesendet: Dienstag, 14. Juli 2020 16:18 An: 'maths/moodle-qtype_stack' reply@reply.github.com; 'maths/moodle-qtype_stack' moodle-qtype_stack@noreply.github.com Cc: 'Author' author@noreply.github.com Betreff: AW: [maths/moodle-qtype_stack] Issue 537 "Reactive Power [VA] as Unit #537" possibly not solved (#605)

Please see my response below

BR, Jens

Von: Chris Sangwin <notifications@github.com mailto:notifications@github.com > Gesendet: Dienstag, 14. Juli 2020 14:12 An: maths/moodle-qtype_stack <moodle-qtype_stack@noreply.github.com mailto:moodle-qtype_stack@noreply.github.com > Cc: Jens Fortmann <jens.fortmann@htw-berlin.de mailto:jens.fortmann@htw-berlin.de >; Author <author@noreply.github.com mailto:author@noreply.github.com > Betreff: Re: [maths/moodle-qtype_stack] Issue 537 "Reactive Power [VA] as Unit #537" possibly not solved (#605)

(A) Did you re-create your maxima images etc.? This is needed to propagate the fix into the Maxima side of things. I did a test, and 2000kVA works for me. I'll add in a unit test to make sure!

=> I will check with our admin

(B) Ok, well I'm rapidly realising that I don't know physics! Please could you help explain what STACK "should" do with VA?! Does a teacher need an AC/DC context setting perhaps?

=> I can try. The main idea is to find a simple description an AC voltage and current described as

u(t) = û sin(omegat + phi_u) and i(t) = î sin(omegat + phi_i) containing three variable quantities for each equation, amplitude û , frequency f (as part of omega = 2 pi f) and the phase deviation phi.

If we assume

a. the same frequency for both voltage and current (otherwise no active/real power is transferred). b. a (rather) constant frequency, which is common for power systems

the number of variables per equation is only 2, amplitude and phase angle. Using a complex representation, with magnitude (= amplitude) and phase angle (or real and complex component), mathematics become rather easy.

Multiplying two complex components (U,I) leads to a complex Power definition

S = U x conj(I), with S, U and I being complex variables, with S = P + jQ , with S as apparent power, P as active power (voltage and current in phase) and Q as reactive power (voltage an current 90° out of phase). The reactive power Q for a single phase oscillates with 100 Hz it leads to higher losses (P = I² x R), but does not contribute to power transport (its sum is zero over one period,)

The reactive power is important, without reactive power there would be no voltage, without voltage I would not be able to generate a current.

You can find a mathematical description at Wikipedia ( https://en.wikipedia.org/wiki/Phasor https://en.wikipedia.org/wiki/Phasor), but it is rather detailed. Most descriptions I found assume a lot of background knowledge...

Where it touches moodle/Stack are the units: active power (P = real part of S ) is described in W (P = S x cos(phi)), the reactive power with VA (Q = imaginary part of S).

I agree that these definitions are not really helpful since for DC currents VxA =P , so it is important to add if we refer to AC or DC components.

I hope this helps a little.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maths/moodle-qtype_stack/issues/605#issuecomment-658144263 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOFQGELLXLW5U5PSNTHLR33R3RDSPANCNFSM4OUINPNA . https://github.com/notifications/beacon/AOFQGEN6PIEOTF5TBMGMWODR3RDSPA5CNFSM4OUINPNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE45HYBY.gif