Cannot place line as a voltage sensor
-
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 -
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. -
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 )