Closed guitorri closed 9 years ago
Can you provide netlist definitions for this component?
I will give it a thought. I don't understand how the component is supposed to be used in the first place...
For the record, the available Mutual and 3 Mutual have these schematic/netlist definitions:
<MUT Tr1 1 250 140 -29 38 0 0 "1 mH" 0 "1 mH" 0 "0.9" 0>
<MUT2 Tr2 1 250 310 -29 78 0 0 "1 mH" 0 "1 mH" 0 "1 mH" 0 "0.9" 0 "0.9" 0 "0.9" 0>
MUT:Tr1 _net0 _net1 _net2 _net3 L1="1 mH" L2="1 mH" k="0.9"
MUT2:Tr2 _net4 _net5 _net6 _net7 _net8 _net9 L1="1 mH" L2="1 mH" L3="1 mH" k12="0.9" k13="0.9" k23="0.9"
Somehow for the mutualx
, the schematic/netlist need to be parametric with the number of inductors.
QucsStudio seems to have the mutualx
. Maybe we can backport it...
pity that qucsstudio isn't free software lol
The author of QucsStudio is one of the original authors of Qucs... I might be wrong, but the GUI can be considered as a fork from Qucs and it should also be under GPL. As a derivative work it should not be an issue if we backport his improvements. See discussion in pull #15. We tried to contact him for his consent, so far he did not reply. His core solver seems to be new and not available as source.
I began implementation of this component. Netlist definition could be find Inside qucs-core/src/components/mutualx.cpp
Netlist format uses vector L
to store inductors values and vector k
to strore coupling coefficients matrix. The example of proper netlist entry for mutualx is here:
MUTX:Tr1 _net0 gnd n1 gnd gnd n2 L="[1 mH;1 mH;1 mH]" k="[1.0;0.9;0.9;0.9;1.0;0.9;0.9;0.9;1.0]"
k
vector contains also coupling coefficients for self-inductances. These coefficients values should be always set to 1.0
.
I backported some sources from QucsStudio
to implement this component. Now it is available at https://github.com/ra3xdh/qucs/tree/mutualx
Mutualx is now ready for testing. Here is example schematic and simulation results. Simulation results are correct. What should I add or remove?
@ra3xdh it is looking great, thank you for looking into it!
If I may suggest an icon similar to the others, please have it in attachment (png bitmap with transparent background).
There seems to be a typo on your name on the license headers.
Is there a way to dynamically enlarge/reduce the list or parameters depending on the number of coils? If I start with 3 and want 4, first I have to set 4 press OK then edit the component properties again to modify the new parameters. In this case L4 will take the previous value of k12... I hope it makes sense.
MutualX
is based on MultiViewComponent
. EqnDefined
device is similar dynamically changed component. Its behavior is similar. If we change the number of branches properties list is not updated until OK button is pressed. There may be bug outside component. I will check it.
All is fixed now. Property list is updated properly after Apply button is pressed. componentdialog.cpp
was changed. Ready for pull request.
Merged. No big deal but you forgot to add mutual to the Makefile.am. I fixed it for you. I find it helpful to watch the Travis CI status to see if it is building OK.
See: https://github.com/Qucs/qucs/blob/master/qucs-core/src/components/mutualx.h https://github.com/Qucs/qucs/blob/master/qucs-core/src/components/mutualx.cpp
This component is documented on the technical manual, but not available on the Qucs GUI.