Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
The swing equation is of the form:
πœƒΒ Μ‡ = πœ”
πœ”Β Μ‡ =βˆ’π›Όπœ”+𝑃 βˆ’πΎβˆ—sin⁑(πœƒβˆ’πœƒπ‘”π‘Ÿπ‘–π‘‘) //Take πœƒ=x and πœ”=y.


So take F1(x,y,t) = y
Second one is G1(x,y,t)= -alpha*y + p - k*sin(x-Xgrid) //alpha=0.1,p=1,k=8

So please take F1 & G1 for n dimensions(i.e. F1,G1,F2,G2,F3,G3.....Fn,Gn) and write the code for solving using C language.
Posted
Comments
Tomas Takac 13-May-15 5:54am    
We don't do your homework. Try it yourself first then come back with a specific problem.
chandanadhikari 13-May-15 7:36am    
please search for this using google. i could see some useful results. maybe the implementation will be using a different equation but still it will get you started.
Harish0819 14-May-15 3:32am    
Actually I have done this for only 2 dimensions,but that mayn't be applicable for n dimensions i.e generalized program.I can do this problem for n dimensions ,but the codes will be too long and complex in nature.So i want a simple generalized program and mainly facing problem in passing n no of arguments to the subroutine Runge_kutta 4th order method

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900