{"action":"created","issue":{"url":"https://api.github.com/repos/SpiceSharp/SpiceSharp/issues/52","repository_url":"https://api.github.com/repos/SpiceSharp/SpiceSharp","labels_url":"https://api.github.com/repos/SpiceSharp/SpiceSharp/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/SpiceSharp/SpiceSharp/issues/52/comments","events_url":"https://api.github.com/repos/SpiceSharp/SpiceSharp/issues/52/events","html_url":"https://github.com/SpiceSharp/SpiceSharp/issues/52","id":374789499,"node_id":"MDU6SXNzdWUzNzQ3ODk0OTk=","number":52,"title":"Current Source - simulations","user":{"login":"majdaneq","id":32874945,"node_id":"MDQ6VXNlcjMyODc0OTQ1","avatar_url":"https://avatars3.githubusercontent.com/u/32874945?v=4","gravatar_id":"","url":"https://api.github.com/users/majdaneq","html_url":"https://github.com/majdaneq","followers_url":"https://api.github.com/users/majdaneq/followers","following_url":"https://api.github.com/users/majdaneq/following{/other_user}","gists_url":"https://api.github.com/users/majdaneq/gists{/gist_id}","starred_url":"https://api.github.com/users/majdaneq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majdaneq/subscriptions","organizations_url":"https://api.github.com/users/majdaneq/orgs","repos_url":"https://api.github.com/users/majdaneq/repos","events_url":"https://api.github.com/users/majdaneq/events{/privacy}","received_events_url":"https://api.github.com/users/majdaneq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-28T19:30:54Z","updated_at":"2018-10-28T19:56:07Z","closed_at":null,"author_association":"NONE","body":"Hey there, it's me again. \r\n\r\nI'm enjoying using your library. Could you please explain me, what am I doing wrong.\r\n\r\nI've got two different circuits:\r\n1)  var ckt = new Circuit(\r\n        new CurrentSource(\"I1\", \"in\", \"0\", 0.1),\r\n        new Resistor(\"R1\", \"in\", \"out\", 1.0e3),\r\n        new Resistor(\"R2\", \"out\", \"0\", 2.0e3)\r\n    );\r\n2)  var ckt2 = new Circuit(\r\n    new CurrentSource(\"I1\", \"in\", \"0\", 0.1),\r\n    new Capacitor(\"C1\", \"in\", \"out\", 1.0e-6),\r\n    new Resistor(\"R2\", \"out\", \"0\", 2.0e3)\r\n);\r\n\r\nFor the first one I've got a DC Simulation : \r\nvar dc = new DC(\"dc\", \"I1\", 0.0, 5.0, 0.1);\r\ndc.Run(ckt);\r\nAnd for the second, the same simulation:\r\n var dc2 = new DC(\"dc\", \"I1\", 0.0, 5.0, 0.1);\r\ndc2.Run(ckt2);\r\n\r\nThe second simulation returns an error : \r\nSingularException: Singular matrix\r\nSpiceSharp.Algebra.Solve.MarkowitzEntireMatrix`1[T].FindPivot (SpiceSharp.Algebra.Solve.Markowitz`1[T] markowitz, SpiceSharp.Algebra.SparseMatrix`1[T] matrix, System.Int32 eliminationStep) (at <4b44f102b9d74f26b64afbe3a4e65f45>:0)\r\nSpiceSharp.Algebra.Solve.Markowitz`1[T].FindPivot (SpiceSharp.Algebra.SparseMatrix`1[T] matrix, System.Int32 eliminationStep) (at <4b44f102b9d74f26b64afbe3a4e65f45>:0)\r\nSpiceSharp.Algebra.RealSolver.OrderAndFactor () (at <4b44f102b9d74f26b64afbe3a4e65f45>:0)\r\nSpiceSharp.Simulations.BaseSimulation.Iterate (System.Int32 maxIterations) (at <4b44f102b9d74f26b64afbe3a4e65f45>:0)\r\nSpiceSharp.Simulations.DC.Execute () (at <4b44f102b9d74f26b64afbe3a4e65f45>:0)\r\nSpiceSharp.Simulations.Simulation.Run (SpiceSharp.Circuit circuit) (at <4b44f102b9d74f26b64afbe3a4e65f45>:0)\r\n\r\nCould you please explain, if I'm doing something wrong or it's a bug. \r\n\r\nOne more question from my side - am I possible to include Sin and Pulse in Current Source as in Voltage Source?\r\n\r\nThank you for your answer in advance.\r\nRegards,\r\nSimon\r\n"},"comment":{"url":"https://api.github.com/repos/SpiceSharp/SpiceSharp/issues/comments/433736115","html_url":"https://github.com/SpiceSharp/SpiceSharp/issues/52#issuecomment-433736115","issue_url":"https://api.github.com/repos/SpiceSharp/SpiceSharp/issues/52","id":433736115,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzczNjExNQ==","user":{"login":"majdaneq","id":32874945,"node_id":"MDQ6VXNlcjMyODc0OTQ1","avatar_url":"https://avatars3.githubusercontent.com/u/32874945?v=4","gravatar_id":"","url":"https://api.github.com/users/majdaneq","html_url":"https://github.com/majdaneq","followers_url":"https://api.github.com/users/majdaneq/followers","following_url":"https://api.github.com/users/majdaneq/following{/other_user}","gists_url":"https://api.github.com/users/majdaneq/gists{/gist_id}","starred_url":"https://api.github.com/users/majdaneq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/majdaneq/subscriptions","organizations_url":"https://api.github.com/users/majdaneq/orgs","repos_url":"https://api.github.com/users/majdaneq/repos","events_url":"https://api.github.com/users/majdaneq/events{/privacy}","received_events_url":"https://api.github.com/users/majdaneq/received_events","type":"User","site_admin":false},"created_at":"2018-10-28T19:56:06Z","updated_at":"2018-10-28T19:56:06Z","author_association":"NONE","body":"I've checked the similar circuits, RL, LL , LR are working. Unfortunately when Capacitor is placed the simulation returns an error."}}
{"actor":{"display_login":"majdaneq"}}