Sinus excite

pull/1/head
Thorsten Liebig 2010-03-24 18:39:58 +01:00
parent 91267f7ca8
commit 51cad6e1b6
3 changed files with 12 additions and 1 deletions

4
matlab/SetSinusExcite.m Normal file
View File

@ -0,0 +1,4 @@
function FDTD = SetGaussExcite(FDTD,f0);
FDTD.Excitation.ATTRIBUTE.Type=1;
FDTD.Excitation.ATTRIBUTE.f0=f0;

View File

@ -92,7 +92,7 @@ WriteOpenEMS([Sim_Path '/' Sim_CSX],FDTD,CSX);
%cd to working dir and run openEMS
savePath = pwd();
cd(Sim_Path); %cd to working dir
command = [openEMS_Path 'openEMS ' Sim_CSX ' ' openEMS_opts];
command = [openEMS_Path 'openEMS.sh ' Sim_CSX ' ' openEMS_opts];
disp(command);
system(command)
cd(savePath);

View File

@ -109,6 +109,10 @@ int openEMS::SetupFDTD(const char* file)
Excite->QueryDoubleAttribute("f0",&f0);
Excite->QueryDoubleAttribute("fc",&fc);
}
else if (Excit_Type==1)
{
Excite->QueryDoubleAttribute("f0",&f0);
}
TiXmlElement* BC = FDTD_Opts->FirstChildElement("BoundaryCond");
if (BC==NULL)
@ -151,8 +155,11 @@ int openEMS::SetupFDTD(const char* file)
FDTD_Op->DumpOperator2File("operator_dump.vtk");
}
fc = 0;
if (Excit_Type==0)
FDTD_Op->CalcGaussianPulsExcitation(f0,fc);
else if (Excit_Type==1)
FDTD_Op->CalcSinusExcitation(f0,NrTS);
else
{
cerr << "openEMS: Excitation type is unknown" << endl;