[Cuis-dev] Ideal gas and real gas simulation

Luciano Notarfrancesco luchiano at gmail.com
Sun Dec 7 12:27:50 PST 2025


Sorry, I misread the first phrase where you clearly wrote “physics teacher
at my school”. This is a fantastic educational tool!

On Sun, Dec 7, 2025 at 17:42 Luciano Notarfrancesco <luchiano at gmail.com>
wrote:

> Very interesting!
> However, how big has a simulation have to be in order to be useful for
> them? I had the impression that these things are typically huge (millions
> or billions of particles) and run in parallel on supercomputers with GPUs.
> I’d like to know if small simulations running on a CPU have realistic
> applications. Or perhaps it could be more of an educational tool? For some
> computations you could take advantage of the FloatArray primitives to
> compute in bulk (I’m using this for audio DSP and they are really helpful).
> There’s also the possibility to use BLAS libraries via FFI. And in Cuis you
> could also use OpenCL. Keep us posted, this is really interesting.
>
>
> On Sun, Dec 7, 2025 at 17:01 Hilaire Fernandes via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> Hi,
>>
>> When discussing with Physics teacher at my school, its appears gas
>> simulation is something desired. There are some simulation out there, but
>> they keep mentioning me it is a nice tool to have. So I gave a shoot and
>> start the implementation of a DKM[1] for the Dybo project.
>>
>> A first iteration was a very naive, kind of billiard:
>> https://mamot.fr/@drgeo/115577138308536197
>>
>> Then hack some energy transfer from the wall:
>>
>> https://mamot.fr/@drgeo/115598616477391933
>> https://mamot.fr/@drgeo/115600731271105530
>>
>> However this implementation was not correct from the thermodynamic
>> perspective, so I implement a real diffuse energy transfer model:
>> https://mamot.fr/@drgeo/115623761342500850
>>
>> This gave a more or less realistic simulation of ideal gas.
>>
>> The next challenge was to have inter-atomic potential to be considered:
>> atom can be attracted or repulsed from each other. The Lennard-Jones law
>> was used. The tricky part was really the scale and simulation step time:
>>
>> Atom can get crazy unrealistic velocity
>> https://mamot.fr/@drgeo/115669231450451191 because of not small enough
>> simulation time.
>>
>> With a fined tuned simulation time and Morph step time of 100Hz, the
>> result are quite interesting: https://mamot.fr/@drgeo/115669511921472246
>>
>> The final model has both diffuse energy transfer from the wall and
>> inter-atomic potential calculus.
>>
>> Again, the Cuis environment proved to be extremely helpful to fine tune
>> the algorithm.
>>
>> Of course this DKM can be used from a Dybo document, as seen there with
>> another DKM: https://mamot.fr/@drgeo/115400315017925601
>>
>> The aims is develop hundreds of such modules.
>>
>> Hilaire
>>
>> [1]
>> https://github.com/Dynamic-Book/doc/tree/main/4-Explanations/200-Dynamic-Knowledge-Models
>>
>> -- http://mamot.fr/@drgeo
>>
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20251208/9884f7d4/attachment.htm>


More information about the Cuis-dev mailing list