-
Notifications
You must be signed in to change notification settings - Fork 215
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
Review side effects of PR #682 #719
Comments
@felix-salfelder the *meters seem to be doing both, behaving as components (stamping the matrix), see d06558c, but also [hacking the netlist].(https://github.com/Qucs/qucs/blob/develop/qucs/qucs/components/component.cpp#L655-L657) @gildias can you comment? |
A few more notes about PR #682 Qucs: phasordiagram, AC Phasorial diagram, <Phasor ... >
Qucsator: Silence warning:
|
I'm working on a fix for this... |
Can we really solve this? I mean, these diagrams are new features not included in previous releases. I don't see how to tackle this issue properly. I guess the same happens with the recently added CAPQ, INDQ and CIRCLINE components (I didn't check that...) |
once we have plugins, it will be possible to backport new stuff to old versions. currently that does neither seem realistic nor feasible. right now we should think of proper exceptions and error messages to report missing parts (an unavoidable scanario). |
Right now it is is impossible (or very hard) to expand the .sch syntax (add new stuff) without breaking backward compatibility. The current "parser" will just choke at any unknown thing. (off-topic, but) This was one of the main reasons I cautiously opposed from merging the Qucs-S stuff. It is very useful stuff, but I fear that merging it unaware of the consequences it will frustrate users and push the burden of fixing stuff back to us. I guess is ok to break compatibility at some point (things have to evolve). For this reason people use major, minor and patch releases to make it clear what is going on. We can argue that so far we only had patch releases, right? 😄 We should be fully aware of the consequences of breaking compatibility at all times, and work on our favor to help people move forward and minimize regressions and breakage on the user side. The main motivation for me on qucs-test was really this. To help us see the side effects, not to lock the things as is. We also need unit tests. I have something working and will push it shortly. I am more concerned about the issue of internal resistance + additional resistance type of things (did not yet check if that is indeed a problem). Enough of my gibberish. As of now it seems that the above PR needs a bit more work. I am also looking into it. |
Updated the issue description and action list. My question to all is the following: Shall we enable internal resistances for iprobe, vprobe and wprobe? I am in favor of keeping them ideal. Users can add resistors as needed to make the components more realistic. |
in the light of your updated to-do list ("nobody has implemented that anyway"), i suggest to stick to old/legacy probes. newer code will have no problem with users bringing their own probes, if they like. |
I'm also in favor of keeping them ideal. I admit I accepted and merged #682 but, honestly I think that the sources should be an ideal entity... |
Don't worry @andresmmera. I will push the fixes shortly. |
I will remove the ohmmeter. The way it is implemented messes with the nasolver, trsolver, acsolver, dcsolver and the circuit baseclass just to get the information it needs. I don't think this is right approach. This was clearly targeted as an educational tool. The first failure mode is partially covered, if there are other sources actives the ohmmeter gives a NAN reading (which does not help much). The second mode can be confusing for beginners, if there are more than one ohmmeter on the same circuit it gives wrong results. |
Hello, With all the added modules on #682 being targeted towards engineering/electronics students, one of the main objectives was to simplifiy the usage of the simulator, as such, the ability to choose the desired frequencies for the phasor diagram is a great improvement, keeping this philosophy in mind. To clarify, in its current state, the Wave(Temporal) diagram does not display multiple frequencies at once. The netlist was altered so a resistance was added in parallel to the necessary components, with the example of the ammeter, to mimic a "real" component. In the "real" components in which the internal resistance would result in a series with its other parameters, it was directly introduced to those components. The ohmmeter was implemented in a way that it could reach the same values as the voltmeter, as it needs that information to calculate the impedance in the branch, furthermore it should only cause interference whenever it is detected in the circuit. |
Take a look at iprobe, vprobe and wprobe. The implementations for these probes are not leaking out of their respective Perhaps students should be taught to drive a unity voltage source and measure the current. One day they will be confronted with real circuits or with another simulator and they will need to know that much. |
See issue Qucs#719 for context.
See issue Qucs#719 for context.
done. thanks |
I didn't try to use the ohmmeter but the above seems similar to what the S-parameters simulation does - computing the self and mutual (S-)parameters of the different ports (which then you can convert to Z-, Y- or other parameters). |
TODO:
in
qucs-core/scr/circuit.h
remove unneeded virtual functions. Thedc/trsolver
can set the state for ohmmeter and the special cases can be handled inside theohmmeter::initDC
Remove netlist hacking to implement internal resistance, Netlist fix #720.
Revert addition of internal resistance for vdc, vac, idc, iac, iprobe, vprobe
The right way to do it would be to pass the
Ri
parameter and the component sets up the series or parallel resitor. The issue is that for a series resistor the vdc needs to allocate an internal node to add the resistor, even ifRi==0
. So, instead of 2 nodes for each vdc, it will now need 3. I don't thing we should be doing that. If the user wants, just add the Ri manually.Remove netlist hacking for internal resistances of wattmeter, also Netlist fix #720.
Same thing, pass Riv, Rvv to the wprobe and let it takes care of setting the resistors. Here again, instead of 4 nodes, 5 nodes will be required. If the user is looking for more information it might make sense to pay the price of an extra node.
What about iprobe, vprobe? Shall we "upgrade" them to have internal resistance? No, decided to keep them ideal.
- [ ] Concerning AC Phasorial diagram, <Phasor ... > Unknown diagram. Implement now a similar fallback mechanis we have for unknown components, allow to skip unknown diagrams on load.Similarly an unknown Paintings need such thing. A refactor on the parser is needed.Eg.
<Phasor 150 617 217 217 3 #c0c0c0 1 00 1 -687.584 500 687.584 1 -687.584 500 687.584 1 -1 0.5 1 315 0 225 "" "" "" "30 Hz;60 Hz;120 Hz;">
Update new diagrams qucs-help#16- [ ] RemoveHz
from the Phasor list of frequencies, see above.- [ ] get rid of these lines.Such things were already in use there, needs refactor, but not in this pass.if(Diag->Name == "Phasor" || Diag->Name == "Waveac")
. Thephasor
code needs to go tophasor.cpp
,waveac
needs to go towaveac.cpp
This was caught with latest merges:
A few things:
The text was updated successfully, but these errors were encountered: