Home Forums FDTD Batch export analysis files? Reply To: Batch export analysis files?

#83861

Hello, thank you for taking the time to reply.

Dim Linear1
Set Linear1 = WGMgr.CreateObj ( "WGLinear", WGMgr.FindID( "Linear" ) )
Linear1.SetPosition 0.4, 0.002, 2.1, 0.002
Linear1.SetAttr "WidthExpr", "0.1"
Linear1.SetAttr "Depth", "0"
Linear1.SetAttr "StartThickness", "0.000000"
Linear1.SetAttr "EndThickness", "0.000000"
Linear1.SetProfileName "ChannelPro1"
Linear1.SetDefaultThicknessTaperMode True

Dim InputPlane1
Set InputPlane1 = InputPlaneMgr.CreateInputObj ("Continuous", "Rectangular", InputPlaneMgr.FindID( "InputPlane"), "Vertical" )
'Common data for 2D and 3D.
InputPlane1.SetPosition 0.08
InputPlane1.SetDirection "Forward"
InputPlane1.SetWaveLength "0.3"
InputPlane1.SetEnabled True
'Data for 2D.
InputPlane1.SetAmplitudeOrPower "Amplitude", "1.0"
InputPlane1.SetRefLocal
InputPlane1.SetCenterPos "0.0"
InputPlane1.SetHalfWidth "6.0"
InputPlane1.SetTiltingAngle "0"
'Data for 3D.
InputPlane1.SetAmplitudeExpr3D "1.0"
InputPlane1.SetRefLocal3D
InputPlane1.SetCenterPosExpr3D "0.0", "0.0"
InputPlane1.SetHalfWidthExpr3D "0.5", "0.5"
InputPlane1.SetTiltingAngleExpr3D "0"
InputPlane1.SetLYPolarization3D
InputPlane1.RefreshInputField

Dim Reflection
Set Reflection = ObservePtMgr.CreateObservationPoint ( ObservePtMgr.FindID( "ObservationPoint" ) )
Reflection.SetCenter CDbl( 0.04 ), CDbl( 0 )
Reflection.SetDepthExpr ""
Reflection.SetEnabled True
Reflection.Collect2DTE False, False
Reflection.Collect2DTM False, False
Reflection.Collect3D True, True, False, False, False, False

Dim InBetween
Set InBetween = ObservePtMgr.CreateObservationPoint ( ObservePtMgr.FindID( "ObservationPoint" ) )
InBetween.SetCenter CDbl( 0.2 ), CDbl( 0 )
InBetween.SetDepthExpr ""
InBetween.SetEnabled True
InBetween.Collect2DTE False, False
InBetween.Collect2DTM False, False
InBetween.Collect3D True, True, False, False, False, False

Dim InsideMaterial
Set InsideMaterial = ObservePtMgr.CreateObservationPoint ( ObservePtMgr.FindID( "ObservationPoint" ) )
InsideMaterial.SetCenter CDbl( 0.8 ), CDbl( 0 )
InsideMaterial.SetDepthExpr ""
InsideMaterial.SetEnabled True
InsideMaterial.Collect2DTE False, False
InsideMaterial.Collect2DTM False, False
InsideMaterial.Collect3D True, True, False, False, False, False

NumIterations = 6

For x = 1 to NumIterations
InputPlane1.SetWaveLength x*0.1
ParamMgr.Simulate
Next

This is the Macro I am using. I am trying to do a quasi 1-D simulation for a material. I have 1 continuous sinusoidal wave and 3 observation points. 1 behind the EM source, 1 between the EM source and the material, and 1 inside the material.

I would like to repeat this simulation for several wavelengths and retrieve the electric field amplitude over time for all 3 observation points

Categories