Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Time-depending material and damage parameters #159

Open
JTHesse opened this issue May 23, 2024 · 3 comments
Open

[Feature]: Time-depending material and damage parameters #159

JTHesse opened this issue May 23, 2024 · 3 comments
Labels
feature New feature or request

Comments

@JTHesse
Copy link
Collaborator

JTHesse commented May 23, 2024

What are you trying to do and how would you want to do it differently?

I would like to be able to use time-depending values directly in the input deck. For example:

Damage Models:
      Damage:
        Critical Value: 0.1 * t
...

Is it something you currently cannot do? Is this related to an issue/problem?

Implementation is currently unclear, as we have to provide functions for each variable.

Implementation details

  • Utilize the eval() function, similar to BC inputs.
  • Instead of fixed floats, variables needs to be functions
  • Make time globally available

Would you be willing to submit a PR?

Yes

@franciscoyapor
Copy link

Hello! I tried the method at #143 (comment) , for a 2d plate model with varying material properties. However, I am getting the following error message:

[ Info: Run Verlet Solver]
ERROR: LoadError: DimensionMismatch: arrays could not be broadcast to a common size; got a dimension with lengths 6000 and 18
Stacktrace:
  [1] _bcs1
    @ ./broadcast.jl:555 [inlined]
  [2] _bcs
    @ ./broadcast.jl:549 [inlined]
  [3] broadcast_shape
    @ ./broadcast.jl:543 [inlined]
  [4] combine_axes
    @ ./broadcast.jl:524 [inlined]
  [5] _axes
    @ ./broadcast.jl:236 [inlined]
  [6] axes
    @ ./broadcast.jl:234 [inlined]
  [7] combine_axes
    @ ./broadcast.jl:524 [inlined]
  [8] _axes
    @ ./broadcast.jl:236 [inlined]
  [9] axes
    @ ./broadcast.jl:234 [inlined]
 [10] combine_axes
    @ ./broadcast.jl:524 [inlined]
 [11] _axes
    @ ./broadcast.jl:236 [inlined]
 [12] axes
    @ ./broadcast.jl:234 [inlined]
 [13] combine_axes
    @ ./broadcast.jl:524 [inlined]
 [14] _axes
    @ ./broadcast.jl:236 [inlined]
 [15] axes
    @ ./broadcast.jl:234 [inlined]
 [16] combine_axes
    @ ./broadcast.jl:524 [inlined]
 [17] instantiate
    @ ./broadcast.jl:306 [inlined]
 [18] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2}, Nothing, typeof(/), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2}, Nothing, typeof(*), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(/), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(*), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(*), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(*), Tuple{Float64, Vector{Float64}}}, Vector{Float64}}}, Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(-), Tuple{Vector{Float64}, Vector{Float64}}}}}, Vector{Float64}}}, Matrix{Float64}}}, Vector{Float64}}})
    @ Base.Broadcast ./broadcast.jl:903
 [19] compute_forces(datamanager::Module, nodes::Vector{Int64}, material_parameter::Dict{Any, Any}, time::Float64, dt::Float64, to::TimerOutputs.TimerOutput)
    @ PeriLab.Solver.Physics.Material.Set_modules.Bondbased_Elastic ~/download/PeriLab.jl/src/Physics/Material/Material_Models/BondBased/Bondbased_Elastic.jl:102
 [20] compute_forces(datamanager::Module, nodes::Vector{Int64}, model_param::Dict{Any, Any}, time::Float64, dt::Float64, to::TimerOutputs.TimerOutput)
    @ PeriLab.Solver.Verlet.Physics.Material ~/download/PeriLab.jl/src/Physics/Material/Material_Factory.jl:131

I can share the mesh and input files if that helps with debugging.

@J-T1
Copy link

J-T1 commented Aug 12, 2024

Hi @franciscoyapor I can take a look tomorrow, but in the meantime the .yaml and a section of the mesh file would be great.

@CWillberg
Copy link
Collaborator

@franciscoyapor Please send me your mesh and yaml. I will have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants