sndnvaps作者
14年9个月前IP:未同步
386521
1楼
自己坐一坐沙发。
有什么问题。大家说一说。

我把源代码也贴出来。
有需要的,可以研究一下。

这第一份代码是计算频率的:

/*frequent=1/(2*pi*sqrt(L*C)) */
#include<stdio.h>
#include<math.H>
#define pi 3.1415926
int main()
  {
   float l,c,f;
   printf("This software is for caculate the Frequent of Tesla coil\\n");
   printf("To exit this software type 0 \\n");
   printf(" l=x H,c= x F\\n");
   printf("Frequent=1/(2*pi*sqrt(L*c))\\n");
   while (1)
   {
   puts("Enter two number l,c");
   scanf("%f,%f\\n",&l,&c);


   if (l==0||c==0)
    { puts("Error one of the number is zero!");break; }
     else
     {
     f=1/(2*pi*(sqrt(l*c)));
     printf("Frequent=%fKhz\\n",f/1000);
     printf("\\n");
     }
     }

     return f;
     }
————————分割线————————————

第二份代码是计算这个次级线圈的匝数的:


/*Secondary coil Turns=(1/(Magent Wire Diameter+0.000001))*Secondary Wire Winding Height*0.97 */
#include<stdio.h>
#define p 0.000001
int main()
   {
     float d,h,t;
      printf("d=Magen Wire Diameter\\n");
      printf("h=Secondary Wire Winding Height\\n");
      printf("d=x cm,h=x cm \\n");
      puts("If you want to exit the software type 0\\n");
      printfs("t=Secondary coil Turns\\n");
      printf("t=(1/(d+0.000001))*h*0.97\\n");
      while (1)
      {
      printf("Enter two number d,h :\\n");
      scanf("%f,%f\\n",&d,&h);
       if (d==0||h==0)
       { printf("Error !\\n"); break;}
        else
        {
        t=(1/(d+p))*h*0.97;
        printf("Secondary coil Turns= %f T\\n",t);
        printf("\\n");
        }
        }
        return 0;
        }
        
        
      
      ————————————分割线——————————————


有编程源代码的同学,请一齐参与。
我会出更多的软件,有关于这个TC计算的。
希望大家关注。
评论
文号 / 386521

一表人才
名片发私信
学术分 0
总主题 5 帖总回复 115 楼拥有证书:机友 笔友
注册于 2011/11/09 17:53:29最后登录 2026/09/29 19:42:23
主体类型:个人
所属领域:无
认证方式:手机号
IP归属地:0

个人简介

a lazy programmer

笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的