Sinus excite
parent
91267f7ca8
commit
51cad6e1b6
|
@ -0,0 +1,4 @@
|
|||
function FDTD = SetGaussExcite(FDTD,f0);
|
||||
|
||||
FDTD.Excitation.ATTRIBUTE.Type=1;
|
||||
FDTD.Excitation.ATTRIBUTE.f0=f0;
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue