Andrew Moa Blog Site

PowerShell编写STAR-CCM+自动排队计算脚本

When I used STAR-CCM+ to do calculations on a Windows workstation, sometimes I had to submit more than ten or twenty computing tasks in one night. Of course, it was impossible to run more than ten tasks at the same time, and it was impossible to watch it run and submit them manually one by one. A few years ago, I wrote this simple queue calculation template using PowerShell, and I share it with you here.
2 minutes to read
Andrew Moa

Ubuntu24.04 builds Samba server

Since Ubuntu runs in a virtual machine, when you mount a Windows shared folder through Ubuntu, some CAE software will report a calculation error when running it in the mount point. Consider sharing the Ubuntu folder with Windows, so you need to build a Samba server on the Ubuntu system.

First, install the samba package on Ubuntu:

sudo apt install samba -y

Create a shared folder:

mkdir ${HOME}/LinuxShare

Edit the Samba configuration file /etc/samba/smb.conf:

2 minutes to read
Andrew Moa

Hyper-V Virtual Switch NAT Setting Static IP

I have mentioned before that you can use NAT+port mapping to access a virtual machine, but I found a problem during use: every time the host machine is restarted, the default Default Switch IP address will change, causing the virtual machine to be unable to access the gateway and thus unable to connect to the Internet.

In order to ensure that the virtual machine is connected to the Internet, you must manually set the IP address of the adapter corresponding to the Default Switch every time you restart the machine, which is very inconvenient. The following is a solution given in reference to the Microsoft official document .

3 minutes to read
Andrew Moa