Sinus excite
This commit is contained in:
parent
91267f7ca8
commit
51cad6e1b6
4
matlab/SetSinusExcite.m
Normal file
4
matlab/SetSinusExcite.m
Normal file
@ -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
|
%cd to working dir and run openEMS
|
||||||
savePath = pwd();
|
savePath = pwd();
|
||||||
cd(Sim_Path); %cd to working dir
|
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);
|
disp(command);
|
||||||
system(command)
|
system(command)
|
||||||
cd(savePath);
|
cd(savePath);
|
||||||
|
@ -109,6 +109,10 @@ int openEMS::SetupFDTD(const char* file)
|
|||||||
Excite->QueryDoubleAttribute("f0",&f0);
|
Excite->QueryDoubleAttribute("f0",&f0);
|
||||||
Excite->QueryDoubleAttribute("fc",&fc);
|
Excite->QueryDoubleAttribute("fc",&fc);
|
||||||
}
|
}
|
||||||
|
else if (Excit_Type==1)
|
||||||
|
{
|
||||||
|
Excite->QueryDoubleAttribute("f0",&f0);
|
||||||
|
}
|
||||||
|
|
||||||
TiXmlElement* BC = FDTD_Opts->FirstChildElement("BoundaryCond");
|
TiXmlElement* BC = FDTD_Opts->FirstChildElement("BoundaryCond");
|
||||||
if (BC==NULL)
|
if (BC==NULL)
|
||||||
@ -151,8 +155,11 @@ int openEMS::SetupFDTD(const char* file)
|
|||||||
FDTD_Op->DumpOperator2File("operator_dump.vtk");
|
FDTD_Op->DumpOperator2File("operator_dump.vtk");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fc = 0;
|
||||||
if (Excit_Type==0)
|
if (Excit_Type==0)
|
||||||
FDTD_Op->CalcGaussianPulsExcitation(f0,fc);
|
FDTD_Op->CalcGaussianPulsExcitation(f0,fc);
|
||||||
|
else if (Excit_Type==1)
|
||||||
|
FDTD_Op->CalcSinusExcitation(f0,NrTS);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cerr << "openEMS: Excitation type is unknown" << endl;
|
cerr << "openEMS: Excitation type is unknown" << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user