Charge |
The ChargeBodySourceManager type exposes the following members.
| Name | Description | |
|---|---|---|
| EnableCoupledAveraged | Sets the single coupled source to be either coupled averaged or to the default, coupled. |
| Name | Description | |
|---|---|---|
| AssignAnalyticSource(IDesignBody, Double) | Assigns an analytic source with a specified source strength to a single body. | |
| AssignAnalyticSource(IEnumerableIDesignBody, Double) | Assigns an analytic source with a specified source strength to multiple bodies. | |
| AssignCoupled(IDesignBody) | Assigns the Charge body source manager's coupled source to a single body. | |
| AssignCoupled(IEnumerableIDesignBody) | Assigns the Charge body source manager's coupled source to multiple bodies. | |
| AttachSignalFromFileToCoupled | Creates a signal from a filepath and attaches the signal to the coupled source. Automatically sets coupled source to be Coupled Averaged. | |
| AttachSignalToCoupled | Attaches a signal defined within the API to the coupled source. Automatically sets coupled source to be Coupled Averaged. | |
| Create | Create a new Charge body source manager instance. | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
from ema3d.Api.V26.Charging.Excitation import ChargeBodySourceManager as ChargeBodySourceManager from ema3d.Api.V26.Core import Signals as Signals _body_source_manager = ChargeBodySourceManager.Create() body_list = [b for b in GetRootPart().Bodies] # Multi-body assignment or single body assignments can be made. _body_source_manager.AssignAnalyticSource(body_list[0:2], 2.5) _body_source_manager.AssignCoupled(body_list[2:4]) # Attach a signal defined in a file to the coupled source. filepath = r"signal_filepath.dat" _body_source_manager.AttachSignalFromFileToCoupled(filepath, "signal_from_file", Window.ActiveWindow.Document) # Attach a signal defined in the API to the coupled source. gaussian_signal = Signals.GaussianSignal.Create(Window.ActiveWindow.Document) gaussian_signal.Amplitude = 1 gaussian_signal.Alpha = 1e16 gaussian_signal.TPeak = 1e-8 _body_source_manager.AttachSignalToCoupled(gaussian_signal, "signal_from_api")