{"action":"created","issue":{"url":"https://api.github.com/repos/mph-/lcapy/issues/12","repository_url":"https://api.github.com/repos/mph-/lcapy","labels_url":"https://api.github.com/repos/mph-/lcapy/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/mph-/lcapy/issues/12/comments","events_url":"https://api.github.com/repos/mph-/lcapy/issues/12/events","html_url":"https://github.com/mph-/lcapy/issues/12","id":348453622,"node_id":"MDU6SXNzdWUzNDg0NTM2MjI=","number":12,"title":"Examples with ac Voltage Source","user":{"login":"psychemedia","id":82988,"node_id":"MDQ6VXNlcjgyOTg4","avatar_url":"https://avatars0.githubusercontent.com/u/82988?v=4","gravatar_id":"","url":"https://api.github.com/users/psychemedia","html_url":"https://github.com/psychemedia","followers_url":"https://api.github.com/users/psychemedia/followers","following_url":"https://api.github.com/users/psychemedia/following{/other_user}","gists_url":"https://api.github.com/users/psychemedia/gists{/gist_id}","starred_url":"https://api.github.com/users/psychemedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psychemedia/subscriptions","organizations_url":"https://api.github.com/users/psychemedia/orgs","repos_url":"https://api.github.com/users/psychemedia/repos","events_url":"https://api.github.com/users/psychemedia/events{/privacy}","received_events_url":"https://api.github.com/users/psychemedia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-07T19:20:20Z","updated_at":"2018-08-07T19:25:30Z","closed_at":null,"author_association":"NONE","body":"Do you have any examples of working with an ac voltage source? I notice class `lcapy.Vac()` takes a couple of arguments, (`V`, `phi`) which I take to be amplitude and phase shift at a standard frequency (what frequency?)? Or does the voltage need to be defined as a function of time?\r\n\r\nAs a starter example I could bootstrap from, is there a way I can take a simple potential divider:\r\n\r\n```\r\nsch='''\r\nVi 1 0_1 ac {sin(omega)}; down\r\nR1 1 2 22e3; right, size=1.5\r\nR2 2 0 1e3; down\r\nP1 2_2 0_2; down, v=V_{o}\r\nW 2 2_2; right, size=1.5\r\nW 0_1 0; right\r\nW 0 0_2; right\r\n'''\r\n\r\nfn=\"voltageDivider.sch\"\r\nwith open(fn, \"w\") as text_file:\r\n    text_file.write(sch)\r\n    \r\ncct = Circuit(fn)\r\ncct.draw(style='american')\r\n```\r\n\r\nand plot the voltage across R2 in the time domain (e.g. over `t = np.linspace(0, 0.01, 1000)`) alongside that of the original AC source voltage?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mph-/lcapy/issues/comments/411172882","html_url":"https://github.com/mph-/lcapy/issues/12#issuecomment-411172882","issue_url":"https://api.github.com/repos/mph-/lcapy/issues/12","id":411172882,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTE3Mjg4Mg==","user":{"login":"psychemedia","id":82988,"node_id":"MDQ6VXNlcjgyOTg4","avatar_url":"https://avatars0.githubusercontent.com/u/82988?v=4","gravatar_id":"","url":"https://api.github.com/users/psychemedia","html_url":"https://github.com/psychemedia","followers_url":"https://api.github.com/users/psychemedia/followers","following_url":"https://api.github.com/users/psychemedia/following{/other_user}","gists_url":"https://api.github.com/users/psychemedia/gists{/gist_id}","starred_url":"https://api.github.com/users/psychemedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psychemedia/subscriptions","organizations_url":"https://api.github.com/users/psychemedia/orgs","repos_url":"https://api.github.com/users/psychemedia/repos","events_url":"https://api.github.com/users/psychemedia/events{/privacy}","received_events_url":"https://api.github.com/users/psychemedia/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T19:25:30Z","updated_at":"2018-08-07T19:25:30Z","author_association":"NONE","body":"Ah, okay.... if I define my own sinusoidal input:\r\n\r\n`Vi 1 0_1 {sin(t)}`\r\n\r\nI can get the sort of output I expect. I'm still not sure how to use the ac source though?"}}
{"actor":{"display_login":"psychemedia"}}