SpiceSharp

SpiceSharp - Spice# electronic circuit simulator - Сообщения

#1 Опубликовано: 22.11.2024 07:14:57
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

SpiceSharp (Spice#) - electronic circuit simulator

SMath Studio compatibility History page Sources


Based on SpiceSharpParser (.NET library that allows to parse SPICE netlists and to simulate them using SpiceSharp library).

This plugin requires .Net Framework 4.7.2 to be installed for it to work.

I managed to run the first test example on my PC. The plugin is not available on the server yet.

spicesharp-first-example.jpg

Links:

1. SpiceSharpParser
2. SpiceSharp Home Page
Отредактировано 12.09.2025 17:04:15
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Alvaro Diaz Falconi 23.11.2024 12:03:00
#2 Опубликовано: 22.11.2024 07:30:22
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

For experts only.

spice#.sm (5,15 КиБ) скачан 567 раз(а).

Plugins folder: C:\Users\User\AppData\Roaming\SMath\extensions\plugins

SpiceSharp-0.1.9092.9246.zip (10,94 МиБ) скачан 255 раз(а).
Russia ☭ forever, Viacheslav N. Mezentsev
2 пользователям понравился этот пост
francesco rapuano 22.11.2024 19:42:00, Alvaro Diaz Falconi 22.11.2024 12:54:00
#3 Опубликовано: 25.11.2024 12:45:27
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

Hi. A preview for exploring this powerful plugin.

spice# and MNA.sm (577,69 КиБ) скачан 553 раз(а).
spice# and MNA.pdf (1,5 МиБ) скачан 477 раз(а).

Best regards.
Alvaro.
1 пользователям понравился этот пост
#4 Опубликовано: 25.11.2024 13:05:39
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

I haven't even tried these features myself yet. Support for all types of analysis hasn't been tested. There's still a lot of work to do. Maybe I'll do a direct insertion of values ​​into the circuit description. I wanted to try making a circuit with an amplitude detector. The authors have recently added the ability to specify an amplitude-modulated signal. They have a shell (GUI) in which you can also test circuits.
Russia ☭ forever, Viacheslav N. Mezentsev
#5 Опубликовано: 25.11.2024 13:23:12
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

Hi Viacheslav. As far as I could see, the plugin you created works very well, it just has some very minor details, like not recognizing either "u" or "μ" for micro. By the way, handling that is a configurable option in ltspice. So you shouldn't be the first one to have problems with that.

As for the analyses that spice# has, it's just a matter of discovering them, since the documentation they have is very little, and for example, I don't know what convention they followed to enumerate the nodes of the controlled sources. I took the one they use in the Qucs simulator, but there is no standard for that.

I saw the GUI for windows that you mention on github, except that they didn't compile it... or at least I didn't find it, only the source code.

Best regards.
Alvaro.
1 пользователям понравился этот пост
#6 Опубликовано: 25.11.2024 15:21:40
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

Similar project. I assembled it, but I haven't tried it in work.

NextGenSpice_20241125.zip (321,63 КиБ) скачан 261 раз(а).

Links:

1. NextGenSpice/Program.cs
2. NextGenSpice/plot.ps1
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Alvaro Diaz Falconi 25.11.2024 23:42:00
#7 Опубликовано: 01.12.2024 10:51:11
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

New version, more compatible with spice# sintaxis.

spice# and MNA v2.sm (636,64 КиБ) скачан 523 раз(а).

spice# and MNA v2.pdf (1,63 МиБ) скачан 463 раз(а).

Best regards.
Alvaro.
1 пользователям понравился этот пост
#8 Опубликовано: 10.12.2024 01:23:50
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

A task for implementation in the future:

Практический расчет параметров индуктивности
https://forum.cxem.net/index.php?/topic/270218-практический-расчет-параметров-индуктивности/
Russia ☭ forever, Viacheslav N. Mezentsev
#9 Опубликовано: 11.01.2025 16:41:49
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

SMath Studio compatibility History page Changes

Plugin updated.

Changes:

- Plugin adopted to a new SMath Studio Core infrastructure;
- Folders removed from the output artefacts.
Отредактировано 12.09.2025 17:04:34
Russia ☭ forever, Viacheslav N. Mezentsev
4 пользователям понравился этот пост
Oscar Campo 11.01.2025 17:46:00, Andrey Ivashov 11.01.2025 17:00:00, Davide Carpi 11.01.2025 19:57:00, Alvaro Diaz Falconi 12.01.2025 15:48:00
#10 Опубликовано: 10.09.2025 20:57:16
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

SMath Studio compatibility History page Changes AI Assistant

Plugin updated. [BETA]

Changes:

- expanded capabilities of spice#() function.

spice#-tran-example01.sm (10,7 КиБ) скачан 17 раз(а).

image.png
Отредактировано 12.09.2025 17:03:55
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Alvaro Diaz Falconi 11.09.2025 03:57:58
#11 Опубликовано: 11.09.2025 04:06:20
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

Hi. Using MNA method

image.png

spice# and MNA v2.sm (653,28 КиБ) скачан 14 раз(а).

Best regards.
Alvaro.
1 пользователям понравился этот пост
#12 Опубликовано: 11.09.2025 15:34:13
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

😊

spice#-tran-example02.sm (11,84 КиБ) скачан 19 раз(а).

image.png
Russia ☭ forever, Viacheslav N. Mezentsev
#13 Опубликовано: 11.09.2025 20:24:35
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

SMath Studio compatibility History page Changes AI Assistant

Plugin updated. [BETA] 🤪

Changes:

- Custom Icon/Glyph Rendering
- Automatic Export from .SAVE Statement.
- Automatic Interpolation Function Generation.

spice#-tran-example03.sm (11,78 КиБ) скачан 15 раз(а).

image.png
Отредактировано 12.09.2025 17:05:04
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Oscar Campo 12.09.2025 10:04:14
#14 Опубликовано: 12.09.2025 10:09:29
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

SMath Studio compatibility History page Changes AI Assistant

Plugin updated. [BETA]

Changes:

- Refined Glyph Rendering;
- Added "spice#'Options'Interpolator" Operand.

image.png
Отредактировано 12.09.2025 17:05:27
Russia ☭ forever, Viacheslav N. Mezentsev
#15 Опубликовано: 12.09.2025 11:10:39
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

It works

image.png
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Alvaro Diaz Falconi 12.09.2025 18:01:36
#16 Опубликовано: 12.09.2025 18:09:05
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

Hi Viacheslav. Great work, congratulations. Some questions:

I was able to introduce an ampop, which is a fairly theoretical model without many physical parameters. How did you introduce the diode model?

Is it possible to import ltspice models more or less automatically?

Another question: how could V1, V2, and V3 be graphed in your 3DPlot plugin? The CreateSpace function is new, isn't it? Do you have examples of how to use it? Generally, these graphs can't be created in simulators, and the data must be exported to MATLAB or other similar software.

Best regards.
Alvaro.
#17 Опубликовано: 12.09.2025 19:20:54
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

Цитата

I was able to introduce an ampop, which is a fairly theoretical model without many physical parameters. How did you introduce the diode model?


I can tell you how to proceed, i.e. the algorithm for setting the problem.

If you want to simulate the scheme, then you need an example. Nowadays, in the programming world, it is common to accompany source texts with tests. These tests, as a rule, cover many typical tasks.

You need to find these texts, see the link below. Then introduce Gemini to the matter so that he can help create an adequate syntax. I simply throw the test sources into the chat as an example and say what I need.
Цитата

Is it possible to import ltspice models more or less automatically?


Show me an example, if I do this, then yes, it can be done almost automatically and I will tell you how.
Цитата

Another question: how could V1, V2, and V3 be graphed in your 3DPlot plugin? The CreateSpace function is new, isn't it? Do you have examples of how to use it? Generally, these graphs can't be created in simulators, and the data must be exported to MATLAB or other similar software.


Not at the moment, but I can make it so that it will be possible. I don't have enough time to finish this plugin, as it is a bit more complicated than X-Y Plot.
Yes, CreateSpace() is a new function, I asked Gemini to make it, but I haven't used it yet. The plugin does not support the data format returned by this function.

Links:

1. SpiceSharpParser.IntegrationTests
Russia ☭ forever, Viacheslav N. Mezentsev
1 пользователям понравился этот пост
Alvaro Diaz Falconi 12.09.2025 19:45:30
#18 Опубликовано: 12.09.2025 19:56:21
Alvaro Diaz Falconi

Alvaro Diaz Falconi

1 052 сообщений из 1 718 понравились пользователям.

Группа: User

Hi Viacheslav. Thanks, the link you provide shows how to simulate components, for example, a diode:

image.png

image.png

One more question: An option to have outputs with units? I think it would just be a matter of identifying time, volts, and amperes. It would be very practical to be able to use milli, micro, and nano prefixes.

Best regards.
Alvaro.
Отредактировано 12.09.2025 20:03:32
#19 Опубликовано: 12.09.2025 20:27:17
Вячеслав Мезенцев

Вячеслав Мезенцев

1 511 сообщений из 1 819 понравились пользователям.

Группа: Moderator

Цитата

One more question: An option to have outputs with units? I think it would just be a matter of identifying time, volts, and amperes. It would be very practical to be able to use milli, micro, and nano prefixes.


Good advice. We need to think bigger. I want to add elements from the sheet to the schema code. For now, this is done in a limited way, because there is not enough time to think of a convenient solution, but in general it will be possible to both set variables with units separately and get a response with units.

There is probably some support for this in the library code. I'll take a look.
Russia ☭ forever, Viacheslav N. Mezentsev
  • Новые сообщения
  • Нет новых сообщений