Analysis & Postprocessing

Postprocessing results

91 Topics 251 Posts
  • Solve the problem that failed

    1
    0 Votes
    1 Posts
    105 Views
    No one has replied
  • 0 Votes
    1 Posts
    100 Views
    No one has replied
  • 0 Votes
    2 Posts
    159 Views

    Update: I manually summed the fields and got an answer that makes more sense (sum is always greater than amplitude modulation). I am not sure where it is going wrong when I am using the field combiner.

  • SetUp Field Crop Filter

    2
    1 Votes
    2 Posts
    210 Views

    In general, an easy way to create a postprocessing script is to first do it in the GUI and then use the "To-Python" function (available via right-click on the algorithm in the Explorer window).

    Here is what the auto-generated script looks like for a simple pipeline with a Crop Filter:

    # Creating the analysis pipeline # Adding a new SimulationExtractor simulation = document.AllSimulations["EM"] simulation_extractor = simulation.Results() # Adding a new EmSensorExtractor em_sensor_extractor = simulation_extractor["Overall Field"] em_sensor_extractor.FrequencySettings.ExtractedFrequency = u"All" em_sensor_extractor.Normalization.Normalize = True em_sensor_extractor.SurfaceCurrent.SurfaceResolution = 0.001, units.Meters document.AllAlgorithms.Add(em_sensor_extractor) # Adding a new FieldCropFilter inputs = [em_sensor_extractor.Outputs["EM E(x,y,z,f0)"]] field_crop_filter = analysis.core.FieldCropFilter(inputs=inputs) field_crop_filter.LowerExtent = numpy.array([1, 3, 2]) field_crop_filter.UpperExtent = numpy.array([21, 21, 21]) field_crop_filter.UpdateAttributes() document.AllAlgorithms.Add(field_crop_filter)

    Note fyi that you don't actually need to pass a Numpy array to UpperExtent or LowerExtent, it also works if you pass any iterable, like a list or a tuple.

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • 0 Votes
    2 Posts
    420 Views

    In Sim4Life, the complex field S(x,y,z,f0) is (one half of) the cross product of the complex fields E(x,y,z,f0) and H(x,y,z,f0), both of which are the complex representation of harmonic fields (actually S = 0.5 E cross H*, where H* is the complex conjugate of H)
    The time-averaged Poynting vector (if you want the power flow) is given by Re(S)

    See the Wikipedia article (https://en.wikipedia.org/wiki/Poynting_vector) for more detail.

    EDIT: this post was corrected to reflect the notations used in Sim4Life, namley that S(x,y,z,f0) is already the time-averaged quantity and includes the factor 1/2.

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    16 Views
    No one has replied
  • 0 Votes
    2 Posts
    391 Views

    I typically just take screenshots (I recommend SnagIt since it 'snaps' screenshots to subwindows (for example, just the rendering window).

    Alternatively, for reproducibility, I sometimes use a script to take screenshots.

    There's a third way (unfortunately not so reliable), which is to use the built in Screen shot grabber ... Go to 3D View -> Screen Capture (you need to configure it first ... I say it's unreliable because saving a particular '3D View' (Camera Settings -> Save) doesn't work well when you reimport it (views get forgotten or overwritten)

    For the script I do something like this. I create a wireframe, zoom to it, and then use the following script (which you'll need to tweak via trial and error since you might get weird behavior for the color bars and ruler, axis, etc).

    #Manual Record Screenshot import s4l_v1 as s4l import XCoreModeling import XRendererUI import XCoreUI bb = "CameraBoundingBox" e_cam = s4l.model.AllEntities()[bb] bb_pts = XCoreModeling.GetBoundingBox([e_cam]) oglview = XCoreUI.GetUIApp().Frame.MainView[0] oglview.ZoomTo(bb_pts[0], bb_pts[1]) x_size = bb_pts[1][0]-bb_pts[0][0] z_size = bb_pts[1][2]-bb_pts[0][2] img_dim = [x_size,z_size] screen_prefix = "Test" screen_name = "Test" XRendererUI.SaveScreenCapture(width = int(1000*img_dim[0]/img_dim[1]), height = 1000, \ transparent_background = False, output_folder=r"C:\Users\montanaro\Desktop\Screen", \ output_prefix=screen_prefix+screen_name)
  • How to extract point data?

    5
    0 Votes
    5 Posts
    382 Views

    Thanks a lot !

  • 0 Votes
    2 Posts
    149 Views

    Answered in your other post:

    https://forum.zmt.swiss/topic/253/how-do-i-calculate-the-full-width-at-half-maximum-fwhm-volume-data-in-acoustic-ultrasound-simulation

    You would probably need to update the script slightly to use Intensity (a scalar real field) instead of pressure field (scalar complex field) and there would be no need for 'postprocessing' of the field (taking the absolute value of the pressure field; see Notes in my response)

  • 1 Votes
    3 Posts
    479 Views

    @LJ thanks

  • 0 Votes
    1 Posts
    95 Views
    No one has replied
  • 0 Votes
    5 Posts
    924 Views

    Thank you very much for your answer!
    I was observing a mutual inductance in my simulations, but I wasn't sure why it was being generated. I guess I need to read up more on how boundary conditions for current sources are implemented in Sim4Life 🙂

  • Max modulation tool logic

    4
    1 Votes
    4 Posts
    412 Views

    Thanks a lot for sharing your solution!

  • Induced Magnetic H-field

    1
    0 Votes
    1 Posts
    275 Views
    No one has replied
  • Optimization not running

    6
    0 Votes
    6 Posts
    435 Views

    @dstoupis

    We just figured out an issue with the Sweeper and Optimizer in Sim4Life light 5.2.1.1375. We have starting on working on a fix which should be available in the coming few weeks.

    If you urgently need to use the features, you have the option to use an older version of Sim4Life light, e.g., 4.4. If you do not have the installer anymore, please drop us a light at s4l-support@zmt.swiss.

  • 0 Votes
    2 Posts
    160 Views

    Are you perhaps using Sim4Life using Remote Desktop or TeamViewer, or something similar? There are sometimes issues with the graphics drivers when using those software, preventing the Workbench to work correctly. If that's the case, there should be some warnings/errors in the Console when you start Sim4Life, mentioning issues with OpenGL.

  • Electrode position optimization

    1
    1 Votes
    1 Posts
    131 Views
    No one has replied
  • Spherical Field Interpolator

    1
    0 Votes
    1 Posts
    143 Views
    No one has replied
  • Beam Tilt Problem

    2
    0 Votes
    2 Posts
    232 Views

    Hi, I would advice you to look into the Tutorial examples related to 5G (in the FDTD or Optimization tutorial sections). They all include some analysis of beam patterns.
    The key ingredients are the "Far Field Sensor", the "Radiation Evaluator" and the "1D Filter"