GithubHelp home page GithubHelp logo

noxdor / femm_lib Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 14 KB

A Lua 4.0 library for the Finite Element simulation software FEMM, specifically tailored to the needs of TU Dresden students taking the module Finite Elemente Methode in the course Simulation in der Gerätetechnik.

Lua 100.00%

femm_lib's Introduction

About

A Lua 4.0 library for the Finite Element simulation software FEMM, specifically tailored to the needs of TU Dresden students taking the module Finite Elemente Methode in the course Simulation in der Gerätetechnik.

Usage

This repository can be used as a template for defining and solving a problem in FEMMM with Lua. It contains a small library that can be used to simplify and clarify some of the steps that have to be done in order to generate a solution. The simulation is split into steps. Each step has its own file inside the sim folder. These files are being imported in the main Lua script in the top level directory. This file should not have to be touched (except for console and exit functionality), though it can be renamed to fit the problem at hand. Instead, the configurations should be done inside the sim folder in the corresponding step file.

Library modules can be imported by calling:

dofile("lib/<filename>.lua")

For example, to load the file io utilities, a call like this can be issued:

local file_io = dofile("lib/file_io.lua")

After that, the library's functionalities can be used:

file_io.read_input(19, inputs)

Folder structure

There are 4 folders and one main lua script:

.
└───femm_lib
    ├───connection
    ├───lib
    ├───out
    ├───sim
    └───main.lua

Each folder has a different task.

  1. connection: This folder contains the Input_xx.txt and Output_xx.txt files, that are required to connect FEMM to OptiY for nominal value optimisation. Rename the files to match your participant number.
  2. lib: This folder contains functions that simplify and/or clarify some of the steps needed to create a simulation model and solve it. It should be understood as "readonly" and ideally not be adjusted. You can look through the files to see what functionalities it offers.
  3. out: This folder can be used to save the output files of FEMM to keep the top level folder clean. These files are not really needed anyway, since the models configuration and result handling happens fully in Lua.
  4. sim: This folder contains a lua script file for each step needed to create and solve a simulation model, as described above.
  5. main.lua: This file should be the file loaded into FEMM (directly or indirectly with OptiY). It calls the step scripts inside sim, it also contains the boilerplate code to show/hide the console inside FEMM and close the program at the end of simulation if needed. You may rename this file to match the simulation model contained in this folder.

You should definitely rename the foler from femm_lib to the simulation model contained in it (e.g. Lasertrim_xx.lua).

femm_lib's People

Contributors

noxdor avatar

Stargazers

“Emu”Lou avatar Oli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.