Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/escomma/ex16.hs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--------------------------------------------------------------------------------
import DC
import Circuit
import Print

import Array

circuit :: ESim -> [Device]      
circuit z0 = (res1 1 1 0 1000 z0) ++ 
             (dio1 2 1 3 z0) ++ 
             (res1 3 2 0 100.0 z0) ++ 
             --(cap1 4 2 0 1e-4 z0)++
             (vsrc1a 4 1 0 100.0 60.0 z0) ++ 
             (res1 5 1 3 1e6 z0) ++
             (res1 6 3 2 1 z0) ++
             (res1 7 3 0 1e6 z0)       

                       
m = dcOP1 [] [] circuit  

i0 = opvalue m
z = dcTran1 0.0010417125 0.0333333 i0 i0  circuit   

tr = trPrint [0..3] z
main = tr

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.