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

Update Stress to NormStress + Implement TangStress + Update Dependencies #2160

Merged
merged 3 commits into from
Jun 3, 2020

Conversation

Nathaniel-Hu
Copy link
Collaborator

  • contains all changed files related to updating the Stress Data Definition to NormStress + Implementing the new TangStress Data Definition

  • implementation of new TangStress Data Definition also necessitated creation of:

    • new symbol F_t for SSP
    • QDefinition TangStressQD
    • Expr TangStressEqn
    • Unital Chunk TangStress
  • updated all references of totStress to totNormStress (changes related to Item 2)

  • changed files: DataDefs.hs, TMods.hs, Unitals.hs, SSP_SRS.tex, SSP_SRS.html

  • contributes to SSP: fixing scalar vector mismatch #2156 (addresses Issue Item 3, includes changes related to Item 2)

DataDefs.hs
- changes made to update stressDD to normStressDD, stressQD to normStressQD and stressEqn to normStressEqn

GenDefs.hs, TMods.hs
- updated all references to stressDD to normStressDD
DataDefs.hs
- added tangStressDD data definition entry (tangStressDD, tangStressQD, tangStressEqn, ft)
- updated references: totStress to totNorm Stress, added tangStress, ft
- updated DD numbering (tangStressDD is now DD11, push trailing DDs back)

TMods.hs
- updated all references to totStress to totNormStress

Unitals.hs
- updated totStress to totNormStress
- added new entries for symbol ft (tangential force) and unital chunk tangStress

SSP_SRS.tex, SSP_SRS.html
- updated stable files in accordance to changes made by updating all above files
@@ -183,7 +194,7 @@ ratioVarEqn = completeCase [case1, case2]
case2 = (sin (sy QM.pi_ * ((inxi slipDist - idx (sy slipDist) 0) /
(indxn slipDist - idx (sy slipDist) 0))), UnaryOp Not (sy constF))

--DD12
--DD13
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure there is much value to comments with hard-coded numbers. I can see you are making an effort to keep them in sync, but it is a challenge for maintenance. The numbers are something that are automatically generated in the tex file. We should either delete these comments, or change them to something meaningful, like the name of the DD that is being defined.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok then. I've updated the comments by removing the numbers and adding in the DD name and label like so.

--DD ratioVariation: interslice normal to shear force ratio variation function

ratioVariation :: DataDefinition
ratioVariation = dd ratioVarQD [makeCite fredlund1977] Nothing 
  "ratioVariation" []

ratioVarQD :: QDefinition
ratioVarQD = mkQuantDef scalFunc ratioVarEqn

ratioVarEqn :: Expr
ratioVarEqn = completeCase [case1, case2]
  where case1 = (1, sy constF)

        case2 = (sin (sy QM.pi_ * ((inxi slipDist - idx (sy slipDist) 0) /
                (indxn slipDist - idx (sy slipDist) 0))), UnaryOp Not (sy constF))

Does that work @smiths?

@@ -237,6 +239,8 @@ \subsection{Table of Symbols}
\\
${σ_{N}}'$ & Effective Normal Stress: The normal stress in a soil mass that is effective in causing volume changes; represents the average normal stress carried by the soil skeleton. & ${\text{Pa}}$
\\
$τ$ & Tangential Stress: The total force per area acting on the soil mass. & ${\text{Pa}}$
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please change this definition to "The shear force per unit area." We don't have the concept of total force for shear. We also don't need to mention the soil mass. This definition is true whether we are talking about soil, or any other material.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@smiths If we are making an effort to keep these generic (i.e. by not mentioning soil mass, etc.), it may be worthwhile to move them (normal/tangential force/stress) to data-drasil instead of defining them directly in SSP, so they can be re-used by potential future examples. Thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, @bmaclach, moving the generic concepts to data-drasil makes sense. I don't think we need to make this a high priority at the moment, since ssp is the only example with the concept of stress, but this is the way things should go in the future. I'd like to see us attack this problem for all of the examples, using two different approaches:

  1. Top-down - we organize the information using an ontology for physics, math and computing knowledge. Ideally we would be able to find an existing ontology, instead of having to invent something. Unfortunately, my preliminary efforts to find existing ontologies haven't been that encouraging.
  2. Example driven - we add more examples and let the ontology build up organically. For instance, the concept of stress applies to all continuum mechanics problems, but the concept of effective stress is reserved for continuum mechanics problems where the material is a soil, or other granular material.
    I'll edit the "potential projects" wiki page to mention refactoring the existing Drasil examples as the ontology evolves.

Copy link
Collaborator

@smiths smiths left a comment

Choose a reason for hiding this comment

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

Please make the changes requested as comments in my review of the stable files.

DataDefs.hs
- updated DD comments to be more meaningful (removed numbers, added DD names and label)

Unitals.hs
- updated description for tangStress DD

SSP_SRS.tex, SSP_SRS.html
- updated stable files in accordance to changes made to Unitals.hs file
@Nathaniel-Hu
Copy link
Collaborator Author

@smiths, I have made the changes requested. Do any other changes need to be made?

Copy link
Collaborator

@smiths smiths left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Once @JacquesCarette approves, we can merge this PR.

@JacquesCarette JacquesCarette merged commit 704e334 into master Jun 3, 2020
@JacquesCarette JacquesCarette deleted the Issue#2156_III branch June 3, 2020 19:24
@Nathaniel-Hu Nathaniel-Hu linked an issue Jun 3, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSP: fixing scalar vector mismatch
4 participants