Skip to content
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

ZMT zurich med tech

  1. Home
  2. Sim4Life
  3. Simulations & Solvers
  4. Cannot place line as a voltage sensor

Cannot place line as a voltage sensor

Scheduled Pinned Locked Moved Simulations & Solvers
4 Posts 2 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Byron van Vugt
    wrote on last edited by
    #1

    Hi

    I've moved to a new computer with a new install of Sim4Life. On prior models this was not an issue, but I now seem unable to drag and drop (Or find an alternative method) for placing a modelled line as a voltage sensor within the model.
    No error shows up, just nothing happens.

    Cheers,
    Byron

    1 Reply Last reply
    0
    • B Offline
      B Offline
      brown
      ZMT
      wrote on last edited by
      #2

      What version is this happening in? Does Sim4Life show a little circle slash icon when you try to add it?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Byron van Vugt
        wrote on last edited by
        #3

        Hi Brown, Its Version 8.0.0. The drag and drop appears as if it is going to work (no circle slash indicating I cannot place the line within the sensor) but the line is not associated with the sensor following the drag-drop process.
        Has the process for associating a line to a voltage sensor changed without any change in the user manual, or is this a bug? If a bug I will look to reinstall Sim4Life as an attempt to remedy it.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          brown
          ZMT
          wrote on last edited by
          #4

          It looks like this is a bug. Until it is fixed, you can still add line sensors to LF simulations using the API.

          Here is a quick example that adds an entity named 'Lines 1' as a voltage sensor:

          # -*- coding: utf-8 -*-
          
          import numpy
          import s4l_v1.document as document
          import s4l_v1.materials.database as database
          import s4l_v1.model as model
          import s4l_v1.simulation.emlf as emlf
          import s4l_v1.units as units
          from s4l_v1 import ReleaseVersion
          from s4l_v1 import Unit
          
          
          # Define the version to use for default values
          ReleaseVersion.set_active(ReleaseVersion.version8_0)
          
          # Creating the simulation
          simulation = emlf.ElectroQsOhmicSimulation()
          
          # Mapping the components and entities
          component__plane_x = simulation.AllComponents["Plane X+"]
          component__plane_x_1 = simulation.AllComponents["Plane X-"]
          component__background = simulation.AllComponents["Background"]
          component__plane_y = simulation.AllComponents["Plane Y+"]
          component__plane_y_1 = simulation.AllComponents["Plane Y-"]
          component__plane_z = simulation.AllComponents["Plane Z+"]
          component__plane_z_1 = simulation.AllComponents["Plane Z-"]
          component__overall_field = simulation.AllComponents["Overall Field"]
          
          entity__line = model.AllEntities()["Lines 1"]
          
          # Adding a new VoltageSensorSettings
          voltage_sensor_settings = emlf.VoltageSensorSettings()
          components = [entity__line]
          simulation.Add(voltage_sensor_settings, components)
          
          # Editing AutomaticGridSettings "Automatic
          automatic_grid_settings = [x for x in simulation.AllSettings if isinstance(x, emlf.AutomaticGridSettings) and x.Name == "Automatic"][0]
          components = [entity__line]
          simulation.Add(automatic_grid_settings, components)
          
          # Editing AutomaticVoxelerSettings "Automatic Voxeler Settings
          automatic_voxeler_settings = [x for x in simulation.AllSettings if isinstance(x, emlf.AutomaticVoxelerSettings) and x.Name == "Automatic Voxeler Settings"][0]
          components = [entity__line]
          simulation.Add(automatic_voxeler_settings, components)
          
          # Update the materials with the new frequency parameters
          simulation.UpdateAllMaterials()
          
          # Update the grid with the new parameters
          simulation.UpdateGrid()
          
          # Add the simulation to the UI
          document.AllSimulations.Add( simulation )
          
          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Search