University of Rome Tor Vergata - Multi2mech
Educational project to investigate the deformation of a simply supported beam under an imposed loading condition.
This project lays the foundation for applying structural mechanics and Euler-Bernoulli beam theory in an augmented reality application (e.g., Unity), which is why it uses C#.
Two mathematical segments between [0
,ratio*length
] and [ratio*length
,length
]. Hinge in 0
, roller in ratio*length
and force in ratio*length
:
-
.NET SDK. This project is built using .NET. SDK download and install the latest stable version of the .NET SDK (e.g., .NET 6.0 or later). After cloning the repository, run
dotnet restore
to install the required NuGet packages. -
Visual Studio Code or alternative IDE. For development and debugging, use an IDE that supports C#. If you choose VS Code, download it and install the C# Dev Kit extension by Microsoft.
-
Unity (Optional). If you plan to integrate or test the AR components, make sure you have Unity installed. See the AR beam repostory.
-
Any additional libraries referenced in the project file (
.csproj
) will be restored automatically via dotnet restore.
-
Download the repository as
.zip
or clone the repository:git clone https://github.com/yourusername/your-repo.git
-
Open the project folder inside VSCode:
cd path/to/your/repo/
-
Ensure the C# Dev Kit plugin is installed.
-
Restore dependencies and build, from terminal:
dotnet restore dotnet build
-
Use the run (play) button or the following command to run the project:
dotnet run
The output is the image plot.png, like the following one as well as text output in the console:
Solution found!
Segment 1 from z: 0 to z: 5, coefficients: c1 = 8.00E+002, c2 = -0.00E+000, c3 = -3.33E+003, c4 = 0.00E+000, c5 = 0.00E+000, c6 = -0.00E+000
Segment 2 from z: 5 to z: 10, coefficients: c1 = -8.00E+002, c2 = 4.00E+003, c3 = 6.67E+003, c4 = 0.00E+000, c5 = -0.00E+000, c6 = -0.00E+000
The project is easily extendable to any beam, constraint, or loading condition by simply modifying the matrix and solution vector. Remember to group the coefficients into sets of six (
The plotting is automatic; you only need to specify the values for E
, I
, and A
. The coefficients are automatically grouped in sets of six, and you must also provide the sequence of z-coordinates at which the segments are interrupted. See the example for details.