示例#1
0
# limitations under the License.

#### circ2.tcl
####
#### Copy of circ1 where the contact connections have moved around

import devsim
import test_common

devices = ("MyDevice1", "MyDevice2")
region = "MyRegion"

####
#### Meshing
####
test_common.CreateSimpleMesh(device=devices[0], region=region)
devsim.create_device(mesh="dog", device=devices[1])

for device in devices:
    test_common.SetupResistorConstants(device=device, region="")
    test_common.SetupInitialResistorSystem(device, region)

devsim.add_circuit_node(name="cnode1", variable_update="log_damp")
devsim.circuit_element(name="R1", n1="cnode1", n2=0, value=1e15)

# ground these contacts
devsim.set_parameter(device="MyDevice1", name="topbias", value=0.0)
devsim.set_parameter(device="MyDevice2", name="botbias", value=0.0)

test_common.SetupInitialResistorContact(device="MyDevice1",
                                        contact="top",
示例#2
0
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# cap device to test displacement current at contact
import devsim
import test_common

device="MyDevice"
region="MyRegion"

test_common.CreateSimpleMesh(device, region)

###
### Set parameters on the region
###
devsim.set_parameter(device=device, region=region, name="Permittivity", value=3.9*8.85e-14)

###
### Create the Potential solution variable
###
devsim.node_solution(device=device, region=region, name="Potential")

###
### Creates the Potential@n0 and Potential@n1 edge model
###
devsim.edge_from_node_model(device=device, region=region, node_model="Potential")
示例#3
0
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# solid state resistor ssac
import devsim
import res1
import test_common

devsim.circuit_element(name="V1", n1="topbias", n2=0, acreal=1.0)
test_common.CreateSimpleMesh(res1.device, res1.region)
devsim.set_parameter(name="botbias", value=0.0)
res1.run_initial_bias(use_circuit_bias=True)

for v in (0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.10):
    devsim.circuit_alter(name="V1", value=v)
    devsim.solve(type="dc",
                 absolute_error=1.0,
                 relative_error=1e-10,
                 maximum_iterations=30)
    for contact in res1.contacts:
        test_common.printResistorCurrent(device=res1.device, contact=contact)

for f in (0, 1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12):
    devsim.solve(type="ac", frequency=f)