Skip to content

Commit

Permalink
#Analysis of level of smoothness of the ML yield function using the g…
Browse files Browse the repository at this point in the history
…radient of the yield function
  • Loading branch information
Ronakshoghi committed Oct 23, 2023
1 parent acee540 commit 01d126d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/pylabfea/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -1502,8 +1502,18 @@ def create_sig_data(self, N=None, mat_ref=None, sdata=None, Nseq=2, sflow=None,
N = i
if self.dev_only:
sdata = sig_dev(sdata)
seq = np.linspace(Fe, Ce, Nseq)
seq = np.append(seq, np.linspace((2.-Ce), (2.-Fe), Nseq))
# seq = np.linspace(Fe, Ce, Nseq)
# plastic_range_start = 2.-Fe if Nseq == 1 else 2.-Ce
# seq = np.append(seq, np.linspace(plastic_range_start, 2. - Fe, Nseq))
if Nseq == 1:
midpoint = (Fe + Ce) / 2
elastic_seq = np.linspace(midpoint, midpoint, 1)
plastic_seq = np.linspace(2. - midpoint, 2. - midpoint, 1)
seq = np.append(elastic_seq, plastic_seq)
else:
elastic_seq = np.linspace(Fe, Ce, Nseq)
plastic_seq = np.linspace(2. - Ce, 2. - Fe, Nseq)
seq = np.append(elastic_seq, plastic_seq)
if extend:
# add training points in plastic regime to avoid fallback of SVC decision fct. to zero
seq = np.append(seq, np.array([2.4, 3., 4., 5.]))
Expand Down

1 comment on commit 01d126d

@Ronakshoghi
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modification of create_sig_data function for Nseq=1 to upscale and downscale symmetrically in elastic and plastic ranges.

Please sign in to comment.