mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-24 03:07:53 +00:00
Fixing abaqus_reader.jl
This commit is contained in:
+84
-36
@@ -1,77 +1,125 @@
|
||||
# This file is a part of JuliaFEM.
|
||||
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
|
||||
|
||||
abstract JuliaFEMModel
|
||||
abstract BoundaryCondition
|
||||
|
||||
type NeumannBC <: BoundaryCondition
|
||||
value
|
||||
end
|
||||
|
||||
type jMaterial
|
||||
type DirichletBC <: BoundaryCondition
|
||||
|
||||
end
|
||||
|
||||
typealias DisplacementBC DirichletBC
|
||||
typealias TemperatureBC DirichletBC
|
||||
|
||||
typealias ForceBC NeumannBC
|
||||
typealias HeatFluxBC NeumannBC
|
||||
|
||||
"""
|
||||
"""
|
||||
type Material
|
||||
name :: AbstractString
|
||||
scalar_data :: Dict{AbstractString, Float64}
|
||||
owners :: Vector
|
||||
end
|
||||
|
||||
type jNode{T<:Real}
|
||||
# Base.set_index(...) = ...
|
||||
# m = Material(jotian)
|
||||
# m["youngs modulus"] = 200e3
|
||||
"""
|
||||
"""
|
||||
type Node{T<:Real}
|
||||
id::Integer
|
||||
coords::Array{T, 1}
|
||||
end
|
||||
|
||||
type jElement{T<:Real}
|
||||
id::Integer
|
||||
connectivity::Array{T, 1}
|
||||
element_type::AbstractString
|
||||
#"""
|
||||
#"""
|
||||
#type MElement{I <: Integer} #, T <: AbstractElement}
|
||||
# id :: Integer
|
||||
# connectivity :: Array{I, 1}
|
||||
# element_type :: Tet4
|
||||
#end
|
||||
|
||||
"""
|
||||
"""
|
||||
type NodeSet
|
||||
name :: AbstractString
|
||||
node_ids :: Array{Integer, 1}
|
||||
end
|
||||
|
||||
type jNodeSet
|
||||
name::AbstractString
|
||||
node_ids::Array{Integer, 1}
|
||||
end
|
||||
|
||||
type jElementSet
|
||||
"""
|
||||
"""
|
||||
type ElementSet
|
||||
name :: AbstractString
|
||||
element_ids :: Array{Integer, 1}
|
||||
end
|
||||
|
||||
type jProblem
|
||||
problem_type :: Symbol
|
||||
boundary_conditions :: Array{Dict{ASCIIString, Any}, 1}
|
||||
type LoadCase{ T <: AbstractProblem }
|
||||
problem :: T
|
||||
boundary_conditions :: Vector{BoundaryProblem}
|
||||
end
|
||||
|
||||
|
||||
jProblem(a, b) = jProblem(symbol(a), b)
|
||||
|
||||
type jModel <: JuliaFEMModel
|
||||
nodes :: Vector{jNode}
|
||||
elements :: Vector{jElement}
|
||||
sets :: Dict{AbstractString, Union{jNodeSet, jElementSet}}
|
||||
material :: Dict{AbstractString, jMaterial}
|
||||
problems :: Array{jProblem}
|
||||
settings :: Dict{AbstractString, Real}
|
||||
"""
|
||||
"""
|
||||
type Model
|
||||
nodes :: Vector{Node}
|
||||
elements :: Vector{Element}
|
||||
sets :: Dict{AbstractString, Union{NodeSet, ElementSet}}
|
||||
material :: Dict{AbstractString, Material}
|
||||
load_cases :: Vector{LoadCase}
|
||||
# settings :: Dict{AbstractString, Real}
|
||||
end
|
||||
|
||||
jModel() = jModel(jNode[],
|
||||
jElement[],
|
||||
Dict{AbstractString, Union{jNodeSet, jElementSet}}(),
|
||||
Dict{AbstractString, jMaterial}(),
|
||||
jProblem[],
|
||||
Dict{AbstractString, Real}()
|
||||
)
|
||||
|
||||
function build_core_model()
|
||||
|
||||
end
|
||||
Model() = Model(Node[],
|
||||
Element[],
|
||||
Dict{AbstractString, Union{NodeSet, ElementSet}}(),
|
||||
Dict{AbstractString, Material}(),
|
||||
LoadCase[],
|
||||
)
|
||||
|
||||
"""
|
||||
"""
|
||||
function build_core_elements()
|
||||
|
||||
end
|
||||
|
||||
"""
|
||||
"""
|
||||
function set_core_element_material()
|
||||
|
||||
end
|
||||
|
||||
"""
|
||||
element_has_type( ::Type{Val{:C3D4}}) = Tet4
|
||||
"""
|
||||
function create_problems()
|
||||
|
||||
end
|
||||
|
||||
"""
|
||||
"""
|
||||
function add_problems!()
|
||||
|
||||
end
|
||||
|
||||
"""
|
||||
"""
|
||||
function add_element!(model, element)
|
||||
push!(model.elements, element)
|
||||
end
|
||||
|
||||
"""
|
||||
"""
|
||||
function add_node!(model, node)
|
||||
push!(model.nodes, node)
|
||||
end
|
||||
|
||||
"""
|
||||
"""
|
||||
function add_set(model, set)
|
||||
model.sets[set.name] = set
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user