Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a non-ohmic "real bulb" for DC sim #10

Closed
kathy-phet opened this issue Feb 19, 2016 · 40 comments
Closed

Add a non-ohmic "real bulb" for DC sim #10

kathy-phet opened this issue Feb 19, 2016 · 40 comments

Comments

@kathy-phet
Copy link

As we consider redesign, we should consider the possibility of modeling a real bulb as an option, where the resistance changes with the current. As an advanced feature.

@ariel-phet
Copy link

@oliver-phet forwarded me a request for this particular enhancement today:

Dear folks

I am impressed with your simulations - ease of use and accuracy but was disappointed with one aspect of the dc lab - the resistance of the filament lamp stayed perfectly constant! Is there anyway you can change this to have the resistance increasing with current??

Many thanks

I believe we have received this request more than once, and it would be a nice addition. The real bulb should definitely be an "option" and not the default, but it seems worth having this as canonical example of a somewhat non-ohmic component.

@samreid
Copy link
Member

samreid commented Mar 15, 2016

I'm unfamiliar with the physics of non-ohmic light bulbs, can you point me to a model for this? Also a note for when I get to implementing this: adding equations to the matrix solve step seems a much more robust solution than iterating in search of a stable point.

@ariel-phet
Copy link

ariel-phet commented Mar 15, 2016

@samreid well...the resistance basically increases with temperature, I will see if I can find a decent model/reference, but it might be something we "hollywood"

This seems to have some good information:

ohmic-lightbulb(2).pdf

One of the the odd things to keep in mind with a "real" lightbulb will be that as it gets hot, the resistance goes up, so for a fixed voltage, the power dissipated will go down, yet it will still appear "brighter" since the brightness we see is related to the blackbody spectrum output.

I am guessing @phetsims/dubson will have some good insight as how to hollywood this well.

@ariel-phet
Copy link

@samreid I am also going to leave this unassigned for the moment, it is low priority

@ariel-phet ariel-phet removed their assignment Mar 15, 2016
@samreid
Copy link
Member

samreid commented May 8, 2016

Another request for non-ohmic:
image

@samreid samreid changed the title Enhancement Request: Can we consider adding a "real bulb"? Enhancement Request: Can we consider adding a non-ohmic "real bulb"? Jun 6, 2016
@samreid
Copy link
Member

samreid commented Jun 13, 2016

Based on discussion Thursday, I've placed this issue on hold.

@samreid
Copy link
Member

samreid commented Jul 7, 2016

Kathy says we may want to model current as a function of voltage (like a sigmoid), at steady state.

@samreid samreid changed the title Enhancement Request: Can we consider adding a non-ohmic "real bulb"? Add a non-ohmic "real bulb" Jul 8, 2016
@samreid samreid changed the title Add a non-ohmic "real bulb" Add a non-ohmic "real bulb" for DC sim Jul 8, 2016
@samreid
Copy link
Member

samreid commented Jan 25, 2017

From design meeting discussion:

Non-Ohmic bulb would only appear on advanced screen, if implemented.

@samreid
Copy link
Member

samreid commented Jan 25, 2017

From July 20156 meeting:

Big feature request from teachers that would be on lab screen, if included.

As temperature increases, resistance increases

Open questions: does it need to have some memory?

The bulb needs to know how long current has been going through it. Not currently in the model, but SR thinks it can be added. Note: this will not be necessary if we are modeling the R=f(V) as a steady state.

What are the typical learning goals? Looks to be steady state. Teacher request: Is there anyway you can change this to have the resistance increasing with current??

Non-Ohmic Bulb would not have tunable resistance. The resistance would be derived from V and I.

Add a LED, modeled as a diode. Goals for LED: doesn’t turn on until certain voltage threshold (2V?) and won’t turn on if leads are connected in reverse.

LEDs are generally in current-limited circuits. Will be very easy to burn it out without resistance.

@samreid
Copy link
Member

samreid commented Mar 2, 2017

Normally, the current resistance curves are not a function of time.

@arouinfar
Copy link
Contributor

I found another request for a non-Ohmic bulb on Unfuddle.

Unfuddle Ticket #3212

"When the battery voltage is increasing , the resistor is following the Ohm's Law (good thing), but the light to.....(bad thing)
May be is it to difficult to make the resistor value from the light bulb increase. I don't know much about informatic programs.
If you can change that , it would be very good.

@samreid
Copy link
Member

samreid commented Apr 20, 2017

@arouinfar is this for 1.0 or 1.1?

@arouinfar
Copy link
Contributor

I would say this is a 1.1 feature @samreid.

@samreid
Copy link
Member

samreid commented Oct 20, 2020

I committed a proof-of-concept "rough draft" working prototype for non-ohmic light bulbs. Notes on how it was implemented:

The desired curve looks roughly logarithmic, so I modeled I = k*ln(V). In testing, I determined that base=2 with a coefficient k=3 worked well. Combining I=ln(V) with V=IR and solving for R gives R = V/ln(V). I also shift the logarithm so that at V=0 the log is 1.

        const base = 2;

        // I = ln(V)
        // V=IR
        // V=ln(V)R
        // R = V/ln(V)

        // Adjust so it looks good in comparison to a standard bulb
        const coefficient = 3;

        // shift by base so at V=0 the log is 1
        resistorAdapter.value = coefficient * V / logWithBase( V + base, base );

I used the same facility we developed for batteries exceeding their current threshold in #245 (running the computation engine twice). The first run puts all non-ohmic bulbs at 1 ohm to compute their voltage and therefore resistance. Then the second run uses the computed resistance.

I added the non-ohmic bulb to the last page of the carousel in the "Lab" screen, only in the DC simulation. The non-ohmic bulb does not have a control panel.

Some questions for the design team:

  • Please test and comment on the basic functionality.
  • Where should it appear in the carousel?
  • Which screens should it appear on?
  • How should it be labeled?
  • How should it look different from a standard bulb?
  • I picked a coefficient that shows a reasonable dynamic range compared to a standard bulb in parallel, but a standard bulb and non-ohmic bulb have a slightly different brightness at the default 9V. Should we tune it so they have the same brightness with a 9V battery?
  • Any other adjustments to the log base, coefficient or equation?

@Nibbos
Copy link

Nibbos commented Oct 20, 2020 via email

@ChemersSci
Copy link

This would be amazing if implemented and would make the simulation compatible with the GCSE (high school) core practicals in the UK as already mentioned. Myself and the students have found the sims incredibly useful during COVID 19 where practical work isn't as accessible and some students are self isolating. The qualifications regulator has said that we can use simluations instead of completing practical work this year, which has made PhET and invaluable resource.

The circuits and graphs that students need to be able to produce can be found here: https://www.bbc.co.uk/bitesize/guides/zgbwpbk/revision/3 if that helps at all. The inclusion of a diode and the ability to record negative values for V and I would mean students in the UK could fully complete the practical from the simulation, which would be amazing!

Thanks for all the excellent work so far.

@Nibbos
Copy link

Nibbos commented Oct 27, 2020 via email

@Geoffysicist
Copy link

Thanks Sam for finally picking this up. looks good so far. Is there some way we can play with the prototype?

@samreid
Copy link
Member

samreid commented Oct 28, 2020

We have not published a prototype version with these changes, but it should be possible to check out the sources, as described in https://github.com/phetsims/circuit-construction-kit-dc/blob/master/README.md

@samreid
Copy link
Member

samreid commented Oct 29, 2020

I committed the name change and i18n and opened side issues for the remaining work. @arouinfar can this issue be closed?

UPDATE: Or leave it open and on hold as a reminder to reply to all of the users that have requested this feature?

@samreid
Copy link
Member

samreid commented Oct 30, 2020

After some revision, the new behavior looks like this:

Here is I vs V:
image

Here is R vs I
image

@ProfStick @Fedsie @Nibbos @ChemersSci @Geoffysicist does this seem suitable for your use cases?

@Nibbos
Copy link

Nibbos commented Oct 30, 2020 via email

@samreid
Copy link
Member

samreid commented Oct 30, 2020

PS Will negative voltage give same values for current when polarity of
battery is reversed?

Yes, the computation uses the absolute value of the voltage difference:

@Nibbos
Copy link

Nibbos commented Oct 31, 2020 via email

@samreid
Copy link
Member

samreid commented Nov 21, 2020

As far as I can tell, all of the work for this issue is completed (aside from publishing, which will be done in #616 ), closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment