Register to reply 
[FDTD/FORTRAN] problem with tfsf boundary and berenger's pml 
Share this thread: 
#1
Mar1714, 10:32 PM

#2
Mar1714, 11:20 PM

P: 2,930

Not understanding what you're trying to do but trying to help.
Often when a program mostly works but has some problem on the fringes of data computation means that perhaps your for loop indexes are off by 1 so say you want to loop ten times because you have ten values to average but an index is off by one then you actually loop by 9 or by 11 times meaning either one number was not averaged in or some undefined number was averaged in causing strange artifacts in your data as you used the average to compute over things. So the bottom line is check your loops to be sure they are iterating over your data correctly. 


#3
Mar1714, 11:55 PM

Emeritus
Sci Advisor
HW Helper
Thanks
PF Gold
P: 6,469

You have some weird code:



#4
Mar1814, 12:50 AM

P: 56

[FDTD/FORTRAN] problem with tfsf boundary and berenger's pml
Steamking,
I have changed the weird part, but the output is still same. 


#5
Mar1814, 03:11 AM

Sci Advisor
P: 3,593

Do you really expect that everybody who might help you with your programming problem knows what abbreviations like "2d fdtd", "tfsf", "berenger's pml" means?
Have a look here: http://www.physicsforums.com/showthread.php?t=617567 


#6
Mar1814, 03:18 AM

P: 56

sorry...I expected anyone who know FDTD are familiar with term tfsf and berenger's pml because you can find it in fdtd textbook everywhere. Sorry, I will more concern about this. Thank you for your advise.
FDTD : finite difference time domain TFSf : total field scattered field PML : perfectly matched layer 


#7
Mar1814, 03:25 AM

Sci Advisor
P: 3,593

I see lots of fishy stuff, which may make problems. In defining double precision constants, why do you use "e" instead of "d"? Pi is a double precision number, but you only assign it to 3.14159. Hence, cosphi and sinphi should both be equal to sqrt(2.0d0)/2.0d0. Are they?
Always write e.g. "1.0d0" instead of "1.0", only. 


#8
Mar1814, 03:51 AM

P: 56

I am newbie in Fortran. I may mislook about these things. I noted that pi should be assigned as pi = 3.14159265358979. for double precision constant, as example c = 3e8 means that c = light velocity = 3x10**8. about cosphi and sinphi, I don't understand why did you suggested that?



#9
Mar1814, 04:13 AM

Sci Advisor
P: 3,593

This cosphi and sinphi are used very often and imprecisions in pi may matter. 


Register to reply 
Related Discussions  
How to Model Drude Materials using FDTD  Atomic, Solid State, Comp. Physics  1  
[FDTD/Fotran] detected reflection near boundary but don't know why  Programming & Computer Science  3  
[2D FDTD TFSF problem] got error in result but don't know why  General Physics  0  
How to put mur's absorbing boundary condition in 1d fdtd maxwell equation  Programming & Computer Science  0  
Fortran in boundary element  Mechanical Engineering  0 