https://github.com/codelenz/lmesh.jl

Basic building block for other codes

https://github.com/codelenz/lmesh.jl

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (3.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic building block for other codes

Basic Info
  • Host: GitHub
  • Owner: CodeLenz
  • License: mit
  • Language: Julia
  • Default Branch: main
  • Size: 271 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created about 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

LMesh

Basic building block for other codes

https://codelenz.github.io/LMesh.jl/

Basic example - 2D ```julia

using BMesh, LMesh, Plots

Create a background mesh

b2 = Bmeshtruss2D(1.0,2,1.0,2)

Create a vector with material definitions

mat = [Material(Ex=210E9,density=7850.0) ]

Create a vector with geometry dedfinitions

geo = [Geometry(A=1E-4)]

Essential boundary conditions (Supports)

ebc = [1 1 0.0 ; 1 2 0.0; 2 1 0.0; 2 2 0.0]

Point loads

forces = [4 2 100.0 ; 4 1 -100.0]

Create a 2D mesh

m2D = Mesh2D(b2,mat,geo,ebc,forces)

Plots:plot is also overloaded and shows

both essential and natural boundary conditions

plot(m2D)

```

Basic example - 2D with more than one material and geometry ```julia

using BMesh, LMesh, Plots

Create a background mesh

b2 = Bmeshtruss2D(1.0,2,1.0,2)

Create a vector with two materials

mat = [Material(Ex=210E9,density=7850.0) ; Material(Ex=110E9,density=4150.0)]

Create a vector with two geometries

geo = [Geometry(A=1E-4) ; Geometry(A=1E-5)]

Essential boundary conditions (Supports)

ebc = [1 1 0.0 ; 1 2 0.0; 2 1 0.0; 2 2 0.0]

Point loads

forces = [4 2 100.0 ; 4 1 -100.0]

Map elements 1 to 6 to the second material

mat = ones(b2.ne) mat[1:6] .= 2

Map elements 7 to 12 to the second geometry

geo = ones(b2.ne) geo[7:12] .= 2

Create a 2D mesh

m2D = Mesh2D(b2,mat,geo,ebc,forces,matele=mat, geoele=geo)

Plots:plot is also overloaded and shows

both essential and natural boundary conditions

plot(m2D)

```

3D mesh with optional arguments (Dictionary) ```julia

using BMesh, LMesh, Plots

Create the backgound meshe

b3 = Bmeshtruss3D(1.0,2,1.0,2,1.0,2)

Create a vector with material definitions

mat = [Material(Ex=210E9,density=7850.0) ]

Create a vector with geometry dedfinitions

geo = [Geometry(A=1E-4)]

Essential boundary conditions (Supports)

ebc = [1 1 0.0 ; 1 2 0.0; 1 3 0.0; 2 1 0.0; 2 2 0.0; 2 3 0.0]

Point loads

forces = [4 2 100.0 ; 4 1 -100.0]

Create a 3D mesh

m3D = Mesh3D(b3,mat,geo,ebc,forces)

It is possible to define general inputs

as a dictionary {Symbol,Matrix{Float64}}

options = Dict{Symbol,Matrix{Float64}}()

options[:Stiffness] = [1 1 1E5 ; 10 1 1E3] options[:Displacement] = [1 1 1E-3]

m3opt = Mesh3D(b3,mat,geo,apoios2,forcas; options=options)

Plots:plot is also overloaded and shows

both essential and natural boundary conditions

plot(m3D)

Owner

  • Name: Eduardo Lenz
  • Login: CodeLenz
  • Kind: user
  • Location: Joinville, Brazil
  • Company: UDESC

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Dependencies

.github/workflows/documentation.yml actions
  • actions/checkout v2 composite
  • julia-actions/setup-julia latest composite