matlab-stl-files's People
matlab-stl-files's Issues
There are two files that need to be written. The templates for them are attached to this email. File 1 in .csv format. File 2 is stl.
surface_all_nodes.xlsx
File 1: surface_all_nodes.csv
In this file each line has the following format:
ID of the vertex belonging to the lung surface in the Finite Element Mesh, followed by X, Y, Z coordinate of the vertex (in Fortran77 format input).
Please note that the format of the files should be identical to these templates so that we can use the script to get the Boundary Conditions.
> I cannot get separate text files for the separate meshes
I had the same problem for extracting the surfaces in ABAQUS. Think of it this way:
1- a face belongs to the lung surface if and only if it belongs to one element.
2- a face belongs to the tumor surface if and only if it belongs to two elements with two distinct/ unequal materials.
These are the conclusions of several iterations to solve this problem. Please let me know if you have any questions with the underlying reasoning.
You have to write a script for COMSOL that exports these meshes. I think COMSOL is compatible with MATLAB but I am not sure.
File types I need
There are two files that need to be written. The templates for them are attached to this email. File 1 in .csv format. File 2 is stl.
File 1: surface_all_nodes.csv
In this file each line has the following format:
ID of the vertex belonging to the lung surface in the Finite Element Mesh, followed by X, Y, Z coordinate of the vertex (in Fortran77 format input).
Please note that the format of the files should be identical to these templates so that we can use the script to get the Boundary Conditions.
Future Issue:
This is the Fortran code that reads the binary file and assigns the material properties.
The code reads the DATA.bin file records- this is the header of the file.
READ(FID,'(2I5)',REC=1) N_T, N_MAX
WRITE(FMT,'("(", I4, "F10.4)")') N_T
READ(FID,FMT,REC=2)(TIMES(J),J=1,N_T)
It then interpolates the alpha1 and alpha2 coefficients over time and calculates the boundary conditions according to the formula.
I recommend you read this code to understand what the fortran code does. The point of the fortran code is just to read and calculate boundary conditions for the model in ABAQUS. You will have to write something similar for COMSOL but as you see, the code is fairly simple and short.
DISP.for.txt
Lol trying to figure out Github not a real issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.