微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 电磁仿真讨论 > export E and H fields from CST as *.txt files

export E and H fields from CST as *.txt files

时间:03-31 整理:3721RD 点击:
I need E and H fields for 101 frequency. Thus, I defined field monitors by using macros->solver->set broadband field monitor : min= 0.5GHz, max= 2GHz and step = 0.015 GHz. Then I have 202 field monitors and that means 202 result. If I export this results by using file->export->plot data(ASCII), it will take too much time :( Is it possible to save all results at once? I need Ez,Hx and Hy values both real and imaginery parts.

I can use fft in matlab but I could not save the data for given time range(for example time = 0:0.001:5 sec.) I defined field monitors by using time range but when I save it as txt, it saves only one time step.

I know it is so complicated, but if you have any idea please write to me.

Hallo greta_garbo,
may be you should contact info@cst.com.
The field export function is buggy. In my version, just zeros are exported. They are working on a bugfix.
elektr0

Hi greta_garbo
For a single file of S11 or S22 etc you can just Right click on the file and then select copy.
Afterwards you can open a notepad file and paste in it.
It works for the S parameters v/s Frequency case.

Consider you have 101 frequency monitors and you have named those monitors 'Freq=0.5e9', 'Freq=2e9' etc. Then you can use macro to select the results for each monitor in the loop and export the data. See sample below:

================================================== ==
Sub Main ()


For ii=0.5e9 To 2e9 STEP 0.015e9

SelectTreeItem ("2D/3D Results\E-Field\e-field Freq="&ii&"")
With ASCIIExport
.Reset
.FileName (".\E_FIELD_FREQ_"&ii&".dat")
.StepX (0.1)
.StepY (0.1)
.StepZ (0.1)
.Mode ("FixedWidth")
.Execute
End With

SelectTreeItem ("2D/3D Results\H-Field\h-field Freq="&ii&"")
With ASCIIExport
.Reset
.FileName (".\H_FIELD_FREQ_"&ii&".dat")
.StepX (0.1)
.StepY (0.1)
.StepZ (0.1)
.Mode ("FixedWidth")
.Execute
End With

Next

End Sub
=========================================


You might need to adjust the macro to the naming style you use for your field monitors.

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top