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

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


--------------------------------------------------------------------------------
import DC
import Circuit
import Print
import Time
import CPUTime

import Array

circuit :: ESim -> [Device]      
circuit z0 = (trf1 1 1 0 2 0 0.042 z0) ++
             (vsrc2a 2 1 0 311.0 60 z0) ++
             (res1 3 1 0 1e15 z0) ++
             (trf1 4 1 0 0 3 0.042 z0) ++
             (dio1 5 4 3 z0) ++
             (dio1 6 4 2 z0) ++
             (cap1 7 4 0 (250 * (2200.0e-6)) z0) ++
             (res1 8 4 3 1e8 z0) ++
             (res1 9 4 2 1e8 z0) ++
             (res1 10 5 0 0.15 z0) ++   
             (vsrc1 11 4 5 0.0 z0)     
           
              
empty_parm = (ESim (SimInfo OP [] [] [] 0) 0 0 [] []) 
op_out = opPrint m
i0 = opvalue m                       
m = dcOP1 [] [] circuit  
z = dcTran1 0.0010417125 0.0333333 i0 i0  circuit   
tr_out = trPrint [0,1,2,3,4,7,8] z


main = do op_out
          tr_out 
          
          
          

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.