Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] 3D CPML FDTD C Code is available here

Status
Not open for further replies.

jithesh

Member level 5
Joined
Oct 11, 2007
Messages
92
Helped
41
Reputation
81
Reaction score
30
Trophy points
1,298
Location
India
Activity points
1,919
cpml fdtd

Hi

A 3D FDTD code with CPML boundary conditions is attached.
It is implemented in C language and it simulates the radiation from a dipole (Near field only).
I have added proper comments in the code so that anybody who wants to modify can do the same without much trouble.

This code is actually a modified version of the Fortran code provided with Taflove's book, 3rd edition (which is available in the forum).
A Matlab file is also attached, which can be used for visualizing the fields in animated format.
Hope that this may be useful.

Best Regards
Jithesh
 
cpml c code

Thanks, been having trouble with this.

Silly question maybe but what's a Cpml as opposed to a PML?
 
implementation of cpml

CPML is Convolutional PML.
It is more accurate than Berenger's PML.
Moreover the memory requirement for CPML is less compared to Berenger's PML
For more details you can refer Taflove's Book (Second or third edition)
Best Regards
Jithesh
 
Hi
I'm not familiar with C, how should I run this code. I tried to compile and run it with Dev-C++ 4.9.9.2, but there is a problem. What is this error mean: "Source file not compiled"
 
  • Like
Reactions: blin

    blin

    Points: 2
    Helpful Answer Positive Rating
hii
can u tell me how can i calculate the field distribution with in the 3D strucutre using CPML boundary with 3D FDTD method.........i want to calculate the field disrtribution in the dielectric slab due to antenna in direct contact with the slab.... i hv the matlab code for antenna but i don't understand how can i calculate the field distrubution using FDTD in dielctric slab.............
 

m101miri said:
Hi
I'm not familiar with C, how should I run this code. I tried to compile and run it with Dev-C++ 4.9.9.2, but there is a problem. What is this error mean: "Source file not compiled"

Hi,
First you must Compile the code, in Dev-C you can press F9 to Compile&Run.
 

Thanks so much. I have been looking for CPML implementation so long.
 

Hi...I have a question about the code, specifically In the section where the PML parameters are intialized: to initialize, for example ce_x_1, there is an
if ((sige_x_PML_1==0.0)&&(alphae_x_PML_1==0.0)&&(i == nxPML_1-1)){

ce_x_1=0.0;
} else {
ce_x_1=sige_x_PML_1*(be_x_1 - (sige_x_PML_1 + kappae_x_PML_1 * alphae_x_PML_1)/ kappae_x_PML_1;
}

The question is why is the "if" condition needed. Is not enough with the "else" part, without any conditional???

Thanks
 

Convolutional PML is not better than Brenger's PML, there are papers discussed about this. Convolutional PML is developed by S. D. Gedney and Roden Allen, the major part of this work is to understand the PML as a Uniaxial absorbing media rather than split field stretched media, This understanding makes more sense when defining PML's parameters and the implementation is relatively more straight forward. However, the performance is actually the same.

Newer PMLs are actually called CFS-PML (Complex Frequency Shifted PML), Such PML absorbs evanescent waves.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top