-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. adding the module solver containing the MPM solution to the motion…
…s equation. 2. Improvements in documentation.
- Loading branch information
Showing
18 changed files
with
635 additions
and
555 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Purpose | ||
------- | ||
Defines classes for finite elements representation | ||
|
||
Data | ||
---- | ||
Created on Tue Mar 16 08:29:59 2021 | ||
""" | ||
Author | ||
------ | ||
Fabricio Fernandez, <[email protected]> | ||
Represent a finite element | ||
""" | ||
class bar_1D: | ||
""" | ||
Class to create 1D bar element with 2 nodes | ||
Attributes | ||
---------- | ||
eid : int | ||
Element identification | ||
n1 : node type | ||
Node 1 (left) | ||
n2 : node type | ||
Node 2 (right) | ||
L : float | ||
Element length | ||
particles : list | ||
List of particles in element | ||
""" | ||
def __init__(self): | ||
self.eid = 0 # element id | ||
self.n1 = 0 # node 1 | ||
self.n2 = 0 # node 2 | ||
self.L = 0 # element length | ||
self.particles = [] # particles in element | ||
|
||
""" | ||
Represent an 1D finite element with 2 nodes | ||
Attributes | ||
---------- | ||
eid : int | ||
Element identification | ||
n1 : node | ||
Node 1 (left) | ||
n2 : node | ||
Node 2 (right) | ||
L : float | ||
Element length | ||
particles : list | ||
List of particles in the element | ||
""" | ||
|
||
def __init__(self): | ||
self.eid = 0 # element id | ||
self.n1 = 0 # node 1 (left) | ||
self.n2 = 0 # node 2 (right) | ||
self.L = 0 # element length | ||
self.particles = [] # list of particles in element |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
Purpose | ||
------- | ||
Defines nodal integration functions | ||
Data | ||
---- | ||
Created on Tue Mar 16 16:17:03 2021 | ||
Defines nodal integration functions. | ||
This functions in general have the objective to advance in time, or adding quantities at the nodes. | ||
Author | ||
------ | ||
Fabricio Fernandez, <[email protected]> | ||
""" | ||
|
||
def total_force_in_nodes(msh): | ||
""" | ||
Calculate total forces in nodes | ||
Arguments | ||
--------- | ||
msh: mesh | ||
a mesh object | ||
""" | ||
for node in msh.nodes: | ||
node.f_tot = node.f_int + node.f_ext | ||
|
||
def momentum_in_nodes(msh,dt): | ||
""" | ||
Calculate momentum in nodes | ||
Arguments | ||
--------- | ||
msh: mesh | ||
a mesh object | ||
dt: float | ||
time step | ||
""" | ||
for inode in msh.nodes: | ||
inode.momentum += inode.f_tot*dt |
Oops, something went wrong.