- 47
- 15 608
Numurho
Germany
เข้าร่วมเมื่อ 14 ธ.ค. 2021
Hello! Welcome to my channel dedicated to RF component design, specifically cavities and HOM couplers. My goal is to share insights and practical tips from my daily work. I believe there's a gap in the availability of detailed CST Studio Suite tutorials for these components, so I hope this channel can be a valuable resource for engineers and students alike. While the primary focus is on cavity and coupler design using CST, I'll also cover general electromagnetic simulation topics and other tools that I find useful in my design process.
CST Studio Suite - Poynting, Q, Integrals and U
In this video, I explain how to calculate the external quality factor by utilising the Poynting vector, giving a little theoretical background for the calculation. Additionally, I provide an overview of how various fields and quantities can be integrated within CST Studio Suite. Finally, I present a comparison between the external quality factor computed via the complex frequency method and that obtained using the port plane power method, highlighting each approach's distinctions and practical implications.
NOTE: This method works because the waveguide port boundary is a perfect absorber ensuring zero reflections. I have not checked, but in principle, using PMC or PEC boundary conditions at the beampipe ends will not give similar results due to reflection.
NOTE: This method works because the waveguide port boundary is a perfect absorber ensuring zero reflections. I have not checked, but in principle, using PMC or PEC boundary conditions at the beampipe ends will not give similar results due to reflection.
มุมมอง: 19
วีดีโอ
CST Studio Suite - Creating Publication Worthy Images
มุมมอง 2212 ชั่วโมงที่ผ่านมา
In this video, I explain the process for obtaining high-quality images for both presentations and publications. I outline the various techniques and settings that I personally prefer, and while these are tailored to my own workflow, I hope that you will find them useful as a starting point. Feel free to experiment and adjust these methods to suit your individual visualisation preferences and cr...
CST Studio Suite - Q-Factor Calculation
มุมมอง 7119 ชั่วโมงที่ผ่านมา
In this video, I explain quality factors and their calculation. Discussed are intrinsic, external and loaded quality factors and how they are calculated in different versions of CST Studio Suite. [1] Christopoulos, Thomas, et al. "On the calculation of the quality factor in contemporary photonic resonant structures." Optics Express 27.10 (2019): 14505-14522. Below is a reference to a paper abou...
CST Studio Suite - Fixing Modelling Errors On Beamscreen Model
มุมมอง 3414 วันที่ผ่านมา
This is a long-form video where I review a model and work on fixing modelling errors in preparation for transmission parameter studies. Using techniques from my *CST Studio Workflow Tips* playlist, I enhance the model's parameterisation to allow for easier adjustments in the future. Additionally, I explain the issues present in the model and how I address them.
CST Studio Modelling Technique - Fun with Working Coordinate System (WCS)
มุมมอง 7314 วันที่ผ่านมา
This video demonstrates how to utilize the Working Coordinate System (WCS) within CST Studio Suite. For certain models, employing a WCS can significantly simplify the modeling process compared to determining the relative dimensions of each component based on a fixed reference coordinate system.
CST Studio Suite Workflow Improvement Tip - Simplify Complex Geometry Imports
มุมมอง 2975 หลายเดือนก่อน
This video showcases how CST Studio Suite's shape tools can be effectively utilised to streamline the model preparation process. Design often involves collaboration between multiple engineering disciplines. Electrical engineers frequently receive detailed mechanical models containing features irrelevant to electromagnetic simulations, such as flanges, bolt holes, and chamfers. Simplifying these...
CST Studio Suite Workflow Improvement Tip - Close Specific CST Processes Without Shutting Down CST
มุมมอง 685 หลายเดือนก่อน
CST Studio Suite, like any software, is not without its shortcomings. Occasionally, simulations become unresponsive, necessitating manual termination. Unfortunately, Windows Task Manager often proves inadequate for this task. Users are typically forced to resort to drastic measures such as restarting the entire system or closing all CST instances, disrupting ongoing work. To address this, a mor...
CST Studio Suite Animation of the Wakefield of a Particle Beam Moving Through a TESLA cavity
มุมมอง 1986 หลายเดือนก่อน
CST offers a variety of tools, including field, particle, voltage, and current monitors, to create dynamic visualizations tailored to different simulation types. This video demonstrates how to visualize the wakefield generated by a particle beam passing through a TESLA cavity geometry. By utilizing field monitors within CST Studio Suite, we'll create a dynamic animation to illustrate the comple...
Overview of How to Create Animations for Using CST Studio Suite
มุมมอง 2996 หลายเดือนก่อน
Animations are crucial for effectively communicating complex engineering concepts to diverse audiences. CST offers a variety of tools, including field, particle, voltage, and current monitors, to create dynamic visualizations tailored to different simulation types. This video provides a quick overview of the animation options available within CST Studio Suite. While specific solver-based animat...
CST Studio Suite Workflow Improvement Tip - Saving History to Macros: Best Practices and Caveats
มุมมอง 916 หลายเดือนก่อน
Saving your CST Studio Suite modeling process as a macro can significantly streamline your workflow. This allows for quick model replication in new projects and facilitates optimization, especially when dealing with sub-models in larger assemblies. This video demonstrates how to create macros from your history, along with potential limitations and best practices
CST Studio Suite Workflow Improvement Tip - Modify Model from History List CST Studio Suite
มุมมอง 906 หลายเดือนก่อน
CST Studio Suite Workflow Improvement Tip - Modify Model from History List CST Studio Suite
Effect of Model Variations on Mesh and Simulation Results in CST Studio Suite (Part 2)
มุมมอง 706 หลายเดือนก่อน
Effect of Model Variations on Mesh and Simulation Results in CST Studio Suite (Part 2)
Do Different Modeling Techniques Affect Mesh Generation in CST Studio Suite?
มุมมอง 1916 หลายเดือนก่อน
Do Different Modeling Techniques Affect Mesh Generation in CST Studio Suite?
Effect of Model Variations on Mesh and Simulation Results in CST Studio Suite (Part 1)
มุมมอง 1726 หลายเดือนก่อน
Effect of Model Variations on Mesh and Simulation Results in CST Studio Suite (Part 1)
CST Studio Suite Workflow Improvement Tip - Copy Results Between Different Simulation Runs
มุมมอง 1246 หลายเดือนก่อน
CST Studio Suite Workflow Improvement Tip - Copy Results Between Different Simulation Runs
CST Studio Suite Workflow Improvement Tip - Copy the Result Template
มุมมอง 1826 หลายเดือนก่อน
CST Studio Suite Workflow Improvement Tip - Copy the Result Template
CST Studio Suite Workflow Improvement Tip - Keep the History List tidy
มุมมอง 1556 หลายเดือนก่อน
CST Studio Suite Workflow Improvement Tip - Keep the History List tidy
Solving Optimisation Problems in CST Studio Suite using the TESLA cavity geometry as an example
มุมมอง 2326 หลายเดือนก่อน
Solving Optimisation Problems in CST Studio Suite using the TESLA cavity geometry as an example
Using Symmetry Planes in CST Studio Suite - TESLA Cavity geometry (Part 2)
มุมมอง 1726 หลายเดือนก่อน
Using Symmetry Planes in CST Studio Suite - TESLA Cavity geometry (Part 2)
Using Symmetry Planes in CST Studio Suite - TESLA Cavity geometry (Part 1)
มุมมอง 1996 หลายเดือนก่อน
Using Symmetry Planes in CST Studio Suite - TESLA Cavity geometry (Part 1)
Transmission (S) parameter analysis of a double-notch hook-type HOM coupler using CST Studio
มุมมอง 118ปีที่แล้ว
Transmission (S) parameter analysis of a double-notch hook-type HOM coupler using CST Studio
Multipacting Analysis (visualisation) of a TESLA cavity mid-cell geom. using CST Studio PIC Solver
มุมมอง 175ปีที่แล้ว
Multipacting Analysis (visualisation) of a TESLA cavity mid-cell geom. using CST Studio PIC Solver
Multipacting Analysis of a TESLA cavity mid-cell geometry using CST Studio PIC Solver
มุมมอง 592ปีที่แล้ว
Multipacting Analysis of a TESLA cavity mid-cell geometry using CST Studio PIC Solver
Evaluating field flatness of SRF cavities using VBA in CST Studio
มุมมอง 336ปีที่แล้ว
Evaluating field flatness of SRF cavities using VBA in CST Studio
TESLA cavity pressure sensitivity calculation with spring boundary conditions - Part 2
มุมมอง 77ปีที่แล้ว
TESLA cavity pressure sensitivity calculation with spring boundary conditions - Part 2
TESLA cavity pressure sensitivity calculation with spring boundary conditions - Part 1: Spring model
มุมมอง 81ปีที่แล้ว
TESLA cavity pressure sensitivity calculation with spring boundary conditions - Part 1: Spring model
Pressure sensitivity calculation for TESLA cavity using CST Studio
มุมมอง 195ปีที่แล้ว
Pressure sensitivity calculation for TESLA cavity using CST Studio
Lorentz force detuning calculation for TESLA cavity using CST Studio
มุมมอง 530ปีที่แล้ว
Lorentz force detuning calculation for TESLA cavity using CST Studio
Calculate loss and kick factors from wakefield simulation using CST Studio
มุมมอง 305ปีที่แล้ว
Calculate loss and kick factors from wakefield simulation using CST Studio
CST Studio: Parametric modelling of a double notch hook-type HOM coupler
มุมมอง 256ปีที่แล้ว
CST Studio: Parametric modelling of a double notch hook-type HOM coupler
16:15 you can align the local WCS to cut with uv plane to find that angle.
Thanks. This works!
NOTE: This method works because the waveguide port boundary is a perfect absorber ensuring zero reflections. I have not checked, but in principle using PMC or PEC boundary conditions at the beampipe ends will not give similar results due to reflections.
Thank you for nice video!
Very good video! Can we obtain the whole data of E and H field distribution after the deformation to calcuate the Q and R/Q please?
If you mean the E and H for the deformed cavity geometry, then yes. On the Post-Processing tab, click on Result Templates, then select 2D and 3D Field Results, and then Export 3D Field Result. If you have a method to calculate the R/Q and Q from the exported data, then the above information is enough to get the fields. However, you can calculate the R/Q and Q directly in CST Studio Suite. Calculating the R/Q is the same step, but the final selection should be the 3D Eigenmode Result. Then in the pop-up window, under ' Result value:' select R over Q. You can also select Q-Factor calculation from this menu. However, you should be careful about which Q-Factor you select since you have two Q-Factor calculations: one from the Perturbation method 'Q-Factor (Perturbation)' and the other from lossy eigenmode simulation 'Q-Factor (lossy Eigenmode).
@@numurho I find that the E and H field of the deformed do not display correctly. I have three tasks, 1. RF simulation with eigen solver; 2. mechanical simulation; 3 RF simualtion with the imported displacement feild from task2. The E and H in the task3 seem the same as the task1.
@@kong4902 How are they displayed? In what way are they the same? Do they look the same or did you try to plot the value along some axis point to compare? For small perturbations, as with the LFD, I do not expect that much change in the fields but the change can be observed by plotting the fields along some axis and comparing the two plots. You may need to zoom in.
@@numurhothe E and H in the 2D results looks the same as the nondeformed. My mechnical deformation is relatively big, the displacement field is visurally obvious. I hope the E and H field will map on the deformed component. It seems I can only have the frequency change with the error analysis, not the change of the Q or RoQ induced by the deformation.
@@kong4902 Now I get what you mean. According to the documentation, contrary to what I thought, the displacement is not actually applied to the geometry, so the fields remain the same. I did see an option to calculate the Q-Factor sensitivity from the 3D Eigenmode Result drop-down, but I did not see this option for the R/Q.
Hey hello sir, could you give me some tips on CST Microwave studio quality factor calculation for SRF cavities I am trying to calculate RF loss coming from the walls defining the material and simulation part is confusing
Hello. I would need more details on what you would like to simulate. However, generally, the quality factor can be calculated from eigenmode simulations. In Post-Processing tab, you should see "Loss and Q". If you click on it, a dialog box opens up and you can define the material properties and select the mode for which you want to calculate loss and Q. This can also be calculated from Result Templates -> 2D and 3D Field Results -> 3D Eigenmode Result -> Q-Factor (Perturbation). Other options available for calculating the quality factors can also be found here. Since I work with SRF cavities, I always assume that my wall losses are negligible (implicitly assumed when using PEC). The external quality factor is then calculated from lossy eigenmode simulation with Result Templates -> 2D and 3D Field Results -> 3D Eigenmode Result -> Q-Factor (lossy Eigenmode). To calculate this you would need to specify ports on both ends of your device geometry. You could write me an email at soskey94@gmail.com, and we could discuss this further.
Hello!, i really liked your videos, thanks for sharing. I would like to ask a question. i did the exact steps you made but for approx. 4*10^6 mesh cells. My particle beam does look like a line and no wakefield occurs when it travels though the cavity. Could you help me with that? Have a nice day :)
Hello. You may have to change the scaling of your fields. On "2D/3D Plot" tab, you can either select "Smart Scaling". To the right, you can also select if you want a log scale or not. You can also manually adjust the scales by clicking and dragging on the colorbar. Best regards.
its the exact tutorial i was looking for. Great work
I am just a beginner to start multipacting simulation. My goal is to simulate it for a coupler with RF window. So, I want to start with a coaxial geometry. Can you suggest how can I start?
TL;DR 1. Model geometry, mesh (hexahedral) parameters and do a local mesh refinement around region of interest. 2. Define solver and compute electromagnetic field 3. Create PIC simulation and import field from previous calculation 4. Shell geometry and define wall material 4. Define particle initial location, type and energy 5. Define required monitors 6. Run simulation and analyse results The starting point depends on the type of solver you plan to use, as this determines how your fields will be obtained. In the video, I perform an eigenmode simulation, which provides the fields directly. If you are doing a time-domain or frequency-domain simulation, you will need to define field monitors for the relevant frequency or over the entire time period. To accurately capture the fields in the region of interest, I recommend performing a local mesh refinement around that area. Next, make a copy of your model and rename it. Change the solver in the copied model to a PIC solver. Then, "shell" the model and define the material properties, such as Secondary Electron Yield (SEY). Import the fields from the previous simulation and specify the particle and initial emission properties, such as velocity or energy, emission area, and emission type. Set up particle monitors as needed, and then run the simulation. Do let me know if you have further questions.
Hi bro. Thanks for all the tutorials. They are helping a lot. I am physics graduate and want to learn particle in cell simulation. Could you please make tutorial how to do particle in cell simulation using cst studio? Charge particle dynamics.
Hi. I'm glad that it helps. Here is a video where I use the PIC solver for multipacting analysis: th-cam.com/video/FEqtqHoyaUA/w-d-xo.html. I hope this helps. You could also let me know if there is a particular analysis application that you are interested in.
great guy, i appreciate 👍
So weldon sir
Can you share the Power Point
I've added a link in the description. Do let me know if you're able to access it.
Well done
Can you share your e-mail
You are master of CST
Pic simulation of entire klystron
I only have a vague idea of the operation of klystrons. Howver, if you could point me to a paper from which I could get the model, I could look at it and perhaps come out with something.
You are superb
Give yr email
PIC simulation in cavity for electron beam
Hi. Have you already seen my video on multipacting analysis for a cavity using the PIC solver?
Electron beam bunching in klystron
If you could point me to a paper, it would be helpful as I don't work primarily with klystrons.
Pls share yr email
PIC MODEL
Hi. Have you already seen my video on multipacting analysis for a cavity using the PIC solver?
Please
Full klystron smulation
PIC simulation
Correction: picofarads not picocoulombs. Thanks to @joaopaulocoelho5401 for pointing that out. If you notice some other errors, please call my attention to it. Thanks.
Secondary emission properties of Niobium used for this simulation: SEE - Niobium (300 deg C Bakeout) Material Set = Default Type = Lossy metal SE emission = Furman NOTE: In order to access the "Particles" tab, your "Problem type" has to be either "PIC" or "Tracking". On the "Particles" tab for material definition, select Furman as the SE emission model, click on ''True", and input the following for Energy and SEY Energy: 300 SEY: 1.49 SEE Niobium (Wet Treatment) Energy: 300 SEY: 1.2 [1] Kneisel, P. (2003, September). Surface characterization of bulk Nb: what has been done, what has been learnt?. In Proc. of the 11th Workshop on RF Superconductivity, Lübeck/Travemünde, Germany. [2] Scheuerlein, C., Hilleret, N., & Taborelli, M. (2002). The secondary electron yield of air exposed metal surfaces at the example of niobium. Appl. Phys., A, 76(CERN-EST-2002-003-SM), 1085-1091. You can also look here for a description of the Furman model. [3] Furman, M. A., & Pivi, M. T. F. (2002). Probabilistic model for the simulation of secondary electron emission. Physical review special topics-accelerators and beams, 5(12), 124404.
Superb video, thank you! I'm trying to do the same simulation but I don't have the SEE material, how can I get it into the CST materials library?
Thanks. Apologies, I think I defined it some time ago, and it's been carried over since then to newer versions of CST that I thought came predefined. Here are the relevant properties for the definition of the material. SEE - Niobium (300 deg C Bakeout) Material Set = Default Type = Lossy metal SE emission = Furman NOTE: In order to access the "Particles" tab, your "Problem type" has to be either "PIC" or "Tracking". On the "Particles" tab for material definition, select Furman as the SE emission model, click on ''True", and input the following for Energy and SEY Energy: 300 SEY: 1.49 SEE Niobium (Wet Treatment) Energy: 300 SEY: 1.2 I got the secondary emission properties from these papers: [1] Kneisel, P. (2003, September). Surface characterization of bulk Nb: what has been done, what has been learnt?. In Proc. of the 11th Workshop on RF Superconductivity, Lübeck/Travemünde, Germany. [2] Scheuerlein, C., Hilleret, N., & Taborelli, M. (2002). The secondary electron yield of air exposed metal surfaces at the example of niobium. Appl. Phys., A, 76(CERN-EST-2002-003-SM), 1085-1091. You can also look here for a description of the Furman model. [3] Furman, M. A., & Pivi, M. T. F. (2002). Probabilistic model for the simulation of secondary electron emission. Physical review special topics-accelerators and beams, 5(12), 124404.
Thanks for the video, it helped a lot. Quick and detailed explanations.
Glad it helped!
Very, very nice video. Just a note that the capacitance is measured in fardads. Maybe you can start a series of TH-cam videos where the goal is just to simulate classic electromagnetism situations using CST since, on youtube, you can only find more advanced stuff. Electrostatic and magnetostatic situations usually solved analytically in a classroom such as a the E field promoted by a charged sphere, the magnetic field and electric field on different regions on a DC current conducting wire, and so on...
I was disturbed by the pC too :) Why values between the way to calculate the capacitance are not the same? Capacitance should be the same each time.
@@pierregirard4850 Hi. The model C=eA/d is an approximation by neglecting the fringe effects that take place at the capacitor armatures boundary. One of the simulations performed in CST led to a result very close to the one predicted by the above model by considering the volume defined by the capacitor plates as the boundary conditions for solving the Maxwell equations. In this case, the electric field lines considered are just the ones within the capacitor plates. In a different simulation, the boundary of the problem is defined to be larger than the volume defined by the capacitor plates. In this new context, the electric field lines that curl outside the plates are also considered. This will lead to an increased "effective" area of the plates and, therefore, the capacitance will increase. In short, it is OK that the two simulations lead to different capacitances since they consider different operating conditions.
Thanks for pointing that out and also the suggestion. I'll keep that in mind.
Thank you, you helped me a lot.
Glad I could help!
Thank you for this video recording. Its helpful in learning the CST tool. U gave very good detailed explanations.
thank you so much, but I have some question about loss factor, and unfortunately I can't connect to TH-cam easy, so if you have time please let me ask my questions by sending email.
Hi. Here is my email: soskey94@gmail.com. I also hardly receive message notifications from TH-cam.
I extended this to a 9 cell cavity and it does not give me the same field in all the cells. The ones at the extremes have less field. Any idea of this?
It depends on the mode you're looking at. For a single cell cavity, the fundamental mode for such cavity geometries is the TM010 mode. When you increase the number of cells, you get different phase advances of the same mode. For example, a two-cell cavity has two phase advances so you'll have two TM010 modes. A 9-cell cavity has nine different phase advances for the TM010 mode. The mode you should check is the 9th mode which is the TM010-π mode. If you already were aware of the above then my question will be if you have beampipes attached. If you have beam pipes attached then this is normal because the fields "leak" into the beampipes. If you make a plot along the axis you will also observe this. This is why the end cells typically have dimensions different from the midcells in order to maintain the uniformity of the field. The value that quantifies this being the so-called field flatness factor.
@@numurhoThanks a lot. I checked and I had the beam pipes but I did not change the end cells. Now I introduced the different end cells and the field along the 9-cell cavity is the same in each cell. You helps is very appreciated.
@@Iamrikarus Glad I could help.
Can you show how to design circulator in 4.2-4.4 GHz
I don't know what a circulator is. If you could provide the link to a paper, I could look at it.
Nice tutorial ! What about the simulation part ?
Thanks! I will upload that as soon as I can.
what a video. You helped me prepare for my lab .
I'm glad it was of help.
how we can extract capacitance in cst ? for this capacitor
Hello. Did you already figure this out? If not, do you mean exporting to a file?
Full video link: th-cam.com/video/M-27GDukj8k/w-d-xo.html VBA Code: ' Field Flatness Sub Main () Dim paths As Variant, types As Variant, fileNames As Variant, info As Variant, nResults As Long ' Get 0D and 1D results from Tables in navigation tree recursively mResults = Resulttree.GetTreeResults("Tables","folder 0D/1D recursive","", paths, types, fileNames, info) Dim m As Long For m = 0 To mResults-1 ' Check if "e_Abs (Z)" result exists If InStr(CStr(fileNames(m)), "e_Abs (Z)") > 0 Then ' ReportInformationToWindow("path: " + CStr(paths(n)) + vbCrLf + "type: " + CStr(types(m)) + vbCrLf + "file: " + CStr(fileNames(m))) ' Get result ID from result tree rids = Resulttree.GetResultIDsFromTreeItem(paths(m)) table_1d_path = paths(m) ' Create result object to hold array of field flatness for all parametric runs Dim result As Object Set result = Result1D("") For Each rid In rids o = Resulttree.GetResultFromTreeItem(table_1d_path, rid) y = o.GetArray("y") ' Initialize the array of peaks peakList = Array() ' Loop through the array to get the peaks For i = 1 To (UBound(y) - 1) 'ReportInformationToWindow(CStr(i) + ": " + CStr(UBound(y))) ' Check if the current element is a peak If y(i) > y(i - 1) And y(i) > y(i + 1) Then ' Re-dimension the array to include the new value ReDim Preserve peakList(0 To UBound(peakList) + 1) ' Add the current element to the peak list peakList(UBound(peakList)) = y(i) End If Next i mx = peakList(0) mn = peakList(0) avg = 0 ' Loop through the array of peaks to get the max and min peak values and the average of all peak values n = UBound(peakList) For Each v In peakList avg = avg + v/n If v > mx Then mx = v End If If v < mn Then mn = v End If Next ' Calculate field flatness ff = (1 - (mx- mn)/avg)*100 ReportInformationToWindow(rid + ":Field Flatness: " + CStr(ff) + "%") rid_v = ExtractIDFromText(rid) result.Appendxy(rid_v, ff) Next ' Save field flatness to Tables\1D Results With result .ylabel("Field Flatness / %") .Title("Field Flatness") .Save("field_flatness.sig") .AddToTree("Field Flatness" + "_" + ExtractTextFromPath(table_1d_path)) End With End If Next End Sub Sub PrintArray(arr) For Each v In arr ReportInformationToWindow(v) Next End Sub Function ExtractIDFromText(txt) As Integer Dim inputText As String inputText = txt Dim startPos As Integer Dim endPos As Integer Dim extractedNumber As String ' Find the position of the last colon (:) in the input text startPos = InStrRev(inputText, ":") + 1 ' Find the position of the next non-numeric character after the last colon For endPos = startPos To Len(inputText) If Not IsNumeric(Mid(inputText, endPos, 1)) Then Exit For End If Next endPos ' Extract the number after the last colon extractedNumber = Mid(inputText, startPos, endPos - startPos) ' Convert the extracted number to an actual number (optional, depends on your use case) Dim result As Integer result = CInt(extractedNumber) ExtractIDFromText = result End Function Function ExtractTextFromPath(pth) As String Dim inputPath As String inputPath = pth Dim lastIndex As Integer lastIndex = InStrRev(inputPath, "\") If lastIndex > 0 Then ExtractTextFromPath = Mid(inputPath, lastIndex + 1) Else ' If no '\' is found, return the original input text ExtractTextFromPath = inputPath End If End Function
' Field Flatness Sub Main () Dim paths As Variant, types As Variant, fileNames As Variant, info As Variant, nResults As Long ' Get 0D and 1D results from Tables in navigation tree recursively mResults = Resulttree.GetTreeResults("Tables","folder 0D/1D recursive","", paths, types, fileNames, info) Dim m As Long For m = 0 To mResults-1 ' Check if "e_Abs (Z)" result exists If InStr(CStr(fileNames(m)), "e_Abs (Z)") > 0 Then ' ReportInformationToWindow("path: " + CStr(paths(n)) + vbCrLf + "type: " + CStr(types(m)) + vbCrLf + "file: " + CStr(fileNames(m))) ' Get result ID from result tree rids = Resulttree.GetResultIDsFromTreeItem(paths(m)) table_1d_path = paths(m) ' Create result object to hold array of field flatness for all parametric runs Dim result As Object Set result = Result1D("") For Each rid In rids o = Resulttree.GetResultFromTreeItem(table_1d_path, rid) y = o.GetArray("y") ' Initialize the array of peaks peakList = Array() ' Loop through the array to get the peaks For i = 1 To (UBound(y) - 1) 'ReportInformationToWindow(CStr(i) + ": " + CStr(UBound(y))) ' Check if the current element is a peak If y(i) > y(i - 1) And y(i) > y(i + 1) Then ' Re-dimension the array to include the new value ReDim Preserve peakList(0 To UBound(peakList) + 1) ' Add the current element to the peak list peakList(UBound(peakList)) = y(i) End If Next i mx = peakList(0) mn = peakList(0) avg = 0 ' Loop through the array of peaks to get the max and min peak values and the average of all peak values n = UBound(peakList) For Each v In peakList avg = avg + v/n If v > mx Then mx = v End If If v < mn Then mn = v End If Next ' Calculate field flatness ff = (1 - (mx- mn)/avg)*100 ReportInformationToWindow(rid + ":Field Flatness: " + CStr(ff) + "%") rid_v = ExtractIDFromText(rid) result.Appendxy(rid_v, ff) Next ' Save field flatness to Tables\1D Results With result .ylabel("Field Flatness / %") .Title("Field Flatness") .Save("field_flatness.sig") .AddToTree("Field Flatness" + "_" + ExtractTextFromPath(table_1d_path)) End With End If Next End Sub Sub PrintArray(arr) For Each v In arr ReportInformationToWindow(v) Next End Sub Function ExtractIDFromText(txt) As Integer Dim inputText As String inputText = txt Dim startPos As Integer Dim endPos As Integer Dim extractedNumber As String ' Find the position of the last colon (:) in the input text startPos = InStrRev(inputText, ":") + 1 ' Find the position of the next non-numeric character after the last colon For endPos = startPos To Len(inputText) If Not IsNumeric(Mid(inputText, endPos, 1)) Then Exit For End If Next endPos ' Extract the number after the last colon extractedNumber = Mid(inputText, startPos, endPos - startPos) ' Convert the extracted number to an actual number (optional, depends on your use case) Dim result As Integer result = CInt(extractedNumber) ExtractIDFromText = result End Function Function ExtractTextFromPath(pth) As String Dim inputPath As String inputPath = pth Dim lastIndex As Integer lastIndex = InStrRev(inputPath, "\") If lastIndex > 0 Then ExtractTextFromPath = Mid(inputPath, lastIndex + 1) Else ' If no '\' is found, return the original input text ExtractTextFromPath = inputPath End If End Function
I forgot to include the part where you export the displacement field to the eigenmode analysis and calculate the frequency shift and pressure sensitivity. Please see previous videos for this.
*promo sm*
Something I missed in the video was changing the background material from "PEC" back to "Normal". However, since the "PEC" material has no mechanical property in CST Studio, it does not make a difference if "Normal" or "PEC" is used for this analysis.
As the help document says the indirect test beam method is used if the beam has an ultrarelativistic velocity and the beam tubes cross section at the entry boundary equals the cross section at the exit boundary. In my model, the beam tube is just an cylinder, two cross sections are totally the same. But the warning came over and said that the indirect testbeams method can not be used, the direct method is used instead. Do not know why.
Hello. Sorry for the late reply. I was not notified of this message. In case you have not been able to fix the problem, I think it has something to do with your boundary conditions.
good
🌚