Skip to main content

Second Harmonic Generation N=1:21



gnuplot> set xrange [-180:180]
gnuplot> set yrange [-180:180]


splot sin(cos(x*pi/180))*sin(cos(x*pi/180))/(cos(x*pi/180)*cos(x*pi/180))*sin(cos(y*pi/180))*sin(cos(y*pi/180))/(cos(y*pi/180)*cos(y*pi/180))+sin(cos((x+1)*pi/180))*sin(cos((x+1)*pi/180))/(cos((x+1)*pi/180)*cos((x+1)*pi/180))*sin(cos((y+1)*pi/180))*sin(cos((y+1)*pi/180))/(cos((y+1)*pi/180)*cos((y+1)*pi/180))+sin(cos((x+2)*pi/180))*sin(cos((x+2)*pi/180))/(cos((x+2)*pi/180)*cos((x+2)*pi/180))*sin(cos((y+2)*pi/180))*sin(cos((y+2)*pi/180))/(cos((y+2)*pi/180)*cos((y+2)*pi/180))+sin(cos((x+3)*pi/180))*sin(cos((x+3)*pi/180))/(cos((x+3)*pi/180)*cos((x+3)*pi/180))*sin(cos((y+3)*pi/180))*sin(cos((y+3)*pi/180))/(cos((y+3)*pi/180)*cos((y+3)*pi/180))+sin(cos((x+4)*pi/180))*sin(cos((x+4)*pi/180))/(cos((x+4)*pi/180)*cos((x+4)*pi/180))*sin(cos((y+4)*pi/180))*sin(cos((y+4)*pi/180))/(cos((y+4)*pi/180)*cos((y+4)*pi/180)) +sin(cos((x+5)*pi/180))*sin(cos((x+5)*pi/180))/(cos((x+5)*pi/180)*cos((x+5)*pi/180))*sin(cos((y+5)*pi/180))*sin(cos((y+5)*pi/180))/(cos((y+5)*pi/180)*cos((y+5)*pi/180))+sin(cos((x+6)*pi/180))*sin(cos((x+6)*pi/180))/(cos((x+6)*pi/180)*cos((x+6)*pi/180))*sin(cos((y+6)*pi/180))*sin(cos((y+6)*pi/180))/(cos((y+6)*pi/180)*cos((y+6)*pi/180))+sin(cos((x+7)*pi/180))*sin(cos((x+7)*pi/180))/(cos((x+7)*pi/180)*cos((x+7)*pi/180))*sin(cos((y+7)*pi/180))*sin(cos((y+7)*pi/180))/(cos((y+7)*pi/180)*cos((y+7)*pi/180))+sin(cos((x+8)*pi/180))*sin(cos((x+8)*pi/180))/(cos((x+8)*pi/180)*cos((x+8)*pi/180))*sin(cos((y+8)*pi/180))*sin(cos((y+8)*pi/180))/(cos((y+8)*pi/180)*cos((y+8)*pi/180)) +sin(cos((x+9)*pi/180))*sin(cos((x+9)*pi/180))/(cos((x+9)*pi/180)*cos((x+9)*pi/180))*sin(cos((y+9)*pi/180))*sin(cos((y+9)*pi/180))/(cos((y+9)*pi/180)*cos((y+9)*pi/180))+sin(cos((x+10)*pi/180))*sin(cos((x+10)*pi/180))/(cos((x+10)*pi/180)*cos((x+10)*pi/180))*sin(cos((y+10)*pi/180))*sin(cos((y+10)*pi/180))/(cos((y+10)*pi/180)*cos((y+10)*pi/180))+sin(cos((x+11)*pi/180))*sin(cos((x+11)*pi/180))/(cos((x+11)*pi/180)*cos((x+11)*pi/180))*sin(cos((y+11)*pi/180))*sin(cos((y+11)*pi/180))/(cos((y+11)*pi/180)*cos((y+11)*pi/180))+sin(cos((x+12)*pi/180))*sin(cos((x+12)*pi/180))/(cos((x+12)*pi/180)*cos((x+12)*pi/180))*sin(cos((y+12)*pi/180))*sin(cos((y+12)*pi/180))/(cos((y+12)*pi/180)*cos((y+12)*pi/180))+sin(cos((x+13)*pi/180))*sin(cos((x+13)*pi/180))/(cos((x+13)*pi/180)*cos((x+13)*pi/180))*sin(cos((y+13)*pi/180))*sin(cos((y+13)*pi/180))/(cos((y+13)*pi/180)*cos((y+13)*pi/180)) +sin(cos((x+14)*pi/180))*sin(cos((x+14)*pi/180))/(cos((x+14)*pi/180)*cos((x+14)*pi/180))*sin(cos((y+14)*pi/180))*sin(cos((y+14)*pi/180))/(cos((y+14)*pi/180)*cos((y+14)*pi/180))+sin(cos((x+15)*pi/180))*sin(cos((x+15)*pi/180))/(cos((x+15)*pi/180)*cos((x+15)*pi/180))*sin(cos((y+15)*pi/180))*sin(cos((y+15)*pi/180))/(cos((y+15)*pi/180)*cos((y+15)*pi/180))+sin(cos((x+16)*pi/180))*sin(cos((x+16)*pi/180))/(cos((x+16)*pi/180)*cos((x+16)*pi/180))*sin(cos((y+16)*pi/180))*sin(cos((y+16)*pi/180))/(cos((y+16)*pi/180)*cos((y+16)*pi/180))+sin(cos((x+17)*pi/180))*sin(cos((x+17)*pi/180))/(cos((x+17)*pi/180)*cos((x+17)*pi/180))*sin(cos((y+17)*pi/180))*sin(cos((y+17)*pi/180))/(cos((y+17)*pi/180)*cos((y+17)*pi/180))+sin(cos((x+18)*pi/180))*sin(cos((x+18)*pi/180))/(cos((x+18)*pi/180)*cos((x+18)*pi/180))*sin(cos((y+18)*pi/180))*sin(cos((y+18)*pi/180))/(cos((y+18)*pi/180)*cos((y+18)*pi/180))+sin(cos((x+19)*pi/180))*sin(cos((x+19)*pi/180))/(cos((x+19)*pi/180)*cos((x+19)*pi/180))*sin(cos((y+19)*pi/180))*sin(cos((y+19)*pi/180))/(cos((y+19)*pi/180)*cos((y+19)*pi/180)) title 'SHG for N=20'        
gnuplot> splot sin(cos(x*pi/180))*sin(cos(x*pi/180))/(cos(x*pi/180)*cos(x*pi/180))*sin(cos(y*pi/180))*sin(cos(y*pi/180))/(cos(y*pi/180)*cos(y*pi/180))+sin(cos((x+1)*pi/180))*sin(cos((x+1)*pi/180))/(cos((x+1)*pi/180)*cos((x+1)*pi/180))*sin(cos((y+1)*pi/180))*sin(cos((y+1)*pi/180))/(cos((y+1)*pi/180)*cos((y+1)*pi/180))+sin(cos((x+2)*pi/180))*sin(cos((x+2)*pi/180))/(cos((x+2)*pi/180)*cos((x+2)*pi/180))*sin(cos((y+2)*pi/180))*sin(cos((y+2)*pi/180))/(cos((y+2)*pi/180)*cos((y+2)*pi/180))+sin(cos((x+3)*pi/180))*sin(cos((x+3)*pi/180))/(cos((x+3)*pi/180)*cos((x+3)*pi/180))*sin(cos((y+3)*pi/180))*sin(cos((y+3)*pi/180))/(cos((y+3)*pi/180)*cos((y+3)*pi/180))+sin(cos((x+4)*pi/180))*sin(cos((x+4)*pi/180))/(cos((x+4)*pi/180)*cos((x+4)*pi/180))*sin(cos((y+4)*pi/180))*sin(cos((y+4)*pi/180))/(cos((y+4)*pi/180)*cos((y+4)*pi/180)) +sin(cos((x+5)*pi/180))*sin(cos((x+5)*pi/180))/(cos((x+5)*pi/180)*cos((x+5)*pi/180))*sin(cos((y+5)*pi/180))*sin(cos((y+5)*pi/180))/(cos((y+5)*pi/180)*cos((y+5)*pi/180))+sin(cos((x+6)*pi/180))*sin(cos((x+6)*pi/180))/(cos((x+6)*pi/180)*cos((x+6)*pi/180))*sin(cos((y+6)*pi/180))*sin(cos((y+6)*pi/180))/(cos((y+6)*pi/180)*cos((y+6)*pi/180))+sin(cos((x+7)*pi/180))*sin(cos((x+7)*pi/180))/(cos((x+7)*pi/180)*cos((x+7)*pi/180))*sin(cos((y+7)*pi/180))*sin(cos((y+7)*pi/180))/(cos((y+7)*pi/180)*cos((y+7)*pi/180))+sin(cos((x+8)*pi/180))*sin(cos((x+8)*pi/180))/(cos((x+8)*pi/180)*cos((x+8)*pi/180))*sin(cos((y+8)*pi/180))*sin(cos((y+8)*pi/180))/(cos((y+8)*pi/180)*cos((y+8)*pi/180)) +sin(cos((x+9)*pi/180))*sin(cos((x+9)*pi/180))/(cos((x+9)*pi/180)*cos((x+9)*pi/180))*sin(cos((y+9)*pi/180))*sin(cos((y+9)*pi/180))/(cos((y+9)*pi/180)*cos((y+9)*pi/180))+sin(cos((x+10)*pi/180))*sin(cos((x+10)*pi/180))/(cos((x+10)*pi/180)*cos((x+10)*pi/180))*sin(cos((y+10)*pi/180))*sin(cos((y+10)*pi/180))/(cos((y+10)*pi/180)*cos((y+10)*pi/180))+sin(cos((x+11)*pi/180))*sin(cos((x+11)*pi/180))/(cos((x+11)*pi/180)*cos((x+11)*pi/180))*sin(cos((y+11)*pi/180))*sin(cos((y+11)*pi/180))/(cos((y+11)*pi/180)*cos((y+11)*pi/180))+sin(cos((x+12)*pi/180))*sin(cos((x+12)*pi/180))/(cos((x+12)*pi/180)*cos((x+12)*pi/180))*sin(cos((y+12)*pi/180))*sin(cos((y+12)*pi/180))/(cos((y+12)*pi/180)*cos((y+12)*pi/180))+sin(cos((x+13)*pi/180))*sin(cos((x+13)*pi/180))/(cos((x+13)*pi/180)*cos((x+13)*pi/180))*sin(cos((y+13)*pi/180))*sin(cos((y+13)*pi/180))/(cos((y+13)*pi/180)*cos((y+13)*pi/180)) +sin(cos((x+14)*pi/180))*sin(cos((x+14)*pi/180))/(cos((x+14)*pi/180)*cos((x+14)*pi/180))*sin(cos((y+14)*pi/180))*sin(cos((y+14)*pi/180))/(cos((y+14)*pi/180)*cos((y+14)*pi/180))+sin(cos((x+15)*pi/180))*sin(cos((x+15)*pi/180))/(cos((x+15)*pi/180)*cos((x+15)*pi/180))*sin(cos((y+15)*pi/180))*sin(cos((y+15)*pi/180))/(cos((y+15)*pi/180)*cos((y+15)*pi/180))+sin(cos((x+16)*pi/180))*sin(cos((x+16)*pi/180))/(cos((x+16)*pi/180)*cos((x+16)*pi/180))*sin(cos((y+16)*pi/180))*sin(cos((y+16)*pi/180))/(cos((y+16)*pi/180)*cos((y+16)*pi/180))+sin(cos((x+17)*pi/180))*sin(cos((x+17)*pi/180))/(cos((x+17)*pi/180)*cos((x+17)*pi/180))*sin(cos((y+17)*pi/180))*sin(cos((y+17)*pi/180))/(cos((y+17)*pi/180)*cos((y+17)*pi/180))+sin(cos((x+18)*pi/180))*sin(cos((x+18)*pi/180))/(cos((x+18)*pi/180)*cos((x+18)*pi/180))*sin(cos((y+18)*pi/180))*sin(cos((y+18)*pi/180))/(cos((y+18)*pi/180)*cos((y+18)*pi/180))+sin(cos((x+19)*pi/180))*sin(cos((x+19)*pi/180))/(cos((x+19)*pi/180)*cos((x+19)*pi/180))*sin(cos((y+19)*pi/180))*sin(cos((y+19)*pi/180))/(cos((y+19)*pi/180)*cos((y+19)*pi/180))+sin(cos((x+20)*pi/180))*sin(cos((x+20)*pi/180))/(cos((x+20)*pi/180)*cos((x+20)*pi/180))*sin(cos((y+20)*pi/180))*sin(cos((y+20)*pi/180))/(cos((y+20)*pi/180)*cos((y+20)*pi/180)) title 'SHG for N=21' 

Comments

Popular posts from this blog

PHYSICS MACHINE

Physics Machine  Ümit Alkuş  Abstract Physics machine is a software which does physics like a physicist. First, all the things human being has developed so far, for doing physics, will be available to this machine. Secondly, all the consistent theories, successful experiments, and published articles will be included into this machine in the form of traced and readable knowledge, in other words, this machine can read and understand these all. Finally, as the last target, this machine can observe the universe and physical events with the aim of creating theories and physical laws.  METU, Physics Department, 06800, Ankara, Turkey   Keywords: Artificial Intelligence, Machine Learning, Data Mining, Artificial Physicist   Introduction There are approximately millions of articles over physics, huge collection of very successful theories, and physics books. In the earth, no physicist could have attempted to read and understand these accumulations since it requires free infinite tim

SIMPLE AND MODIFIED EULER METHOD

##Usage:Call Octave from terminal ##and then call EulerMethodUmitAlkus.m ##from octave and finally ##press enter. That's all. ##Simple Euler Method ##Constants and initializations x=[]; ## initial empty vector for x y=[]; ## initial empty vector for y x(1)=1; ## initial value of x y(1)=1; ## initial value of y h=1E-3; ## increment in x dery=[]; ## 1st derivative of y wrt x dery(1)=0;## 1st entry of dery n=1; ## inital loop index for while ## enter the while loop for the interval x=[1,2] while (x(n)<=2) x(n+1)=x(n)+h; dery(n+1)=x(n)*x(n)-2*y(n)/x(n); ##given y(n+1)=y(n)+h*dery(n+1); ##Euler method n++; endwhile ##exit from the 1st while loop ##Modified Euler Method ##Constant and initializations x(1)=1; ## beginnig of the interval [1,2] ymod(1)=1; ## inital value for modified y. ymid=[]; ## empty vector function evaluated at x midpoint xmid=[]; ## empty vector func. of midpoints of the interval h in x-axis. derymod=[]; ## modified derivatives of ymod