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

SSP: fixing scalar vector mismatch #2156

Closed
smiths opened this issue May 29, 2020 · 13 comments · Fixed by #2157, #2158, #2160 or #2162
Closed

SSP: fixing scalar vector mismatch #2156

smiths opened this issue May 29, 2020 · 13 comments · Fixed by #2157, #2158, #2160 or #2162
Assignees

Comments

@smiths
Copy link
Collaborator

smiths commented May 29, 2020

The discussion from #1115 motivates improving SSP by removing the scalar vector mismatch in the current definition of stress. Removing the mismatch requires the following changes:

  1. Change the current symbol tau (not bold) to tau^f. That is the symbol corresponding to "Shear Strength: The strength of a material against shear failure" should be changed from tau to tau^f. This is the shear at failure, or shear strength.

  2. Change DD:stress as follows:

    • change the Refname from DD:stress to DD:normStress
    • change the label to "Total normal stress"
    • change the Equation to sigma = F_n/A, where F_n is a new symbol, with the definition of "component of a force in the normal direction." The normal force is a scalar, not a vector.
    • an associated change is that everywhere in the document where sigma is defined as total stress the corresponding change will be made to define it as "total normal stress."
  3. Introduce a new data definition DD:tangStress, mostly the same as DD:normStress, except:

    • the label is "Tangential stress"
    • the equation is tau = F_t/A, where F_t is a new symbol, with the definition of "component of a force in the tangential direction." (the symbol tau was previously used for shear strength, but by the change above, there is a new symbol (tau^f) for the shear strength, freeing up tau for the more conventional usage.)
  4. GD:resShr currently references DD:stress, this should be changed to referencing DD:normStress and DD:tangStress.

@Nathaniel-Hu, I'm optimistic that these changes will be straightforward. If you get stuck, I'm sure that @bmaclach can help us. 😄 Please do the items above in order, with a separate PR for each. The more systematic we are, the more likely we'll notice a problem sooner, and we'll be able to back out our changes, if necessary. Please reference this issue in your PR.

Nathaniel-Hu added a commit that referenced this issue Jun 1, 2020
- contains all changed files related to updating the Shear Strength Symbol from tau to tau^f for SSP
- i.e. Unitals.hs, SSP_SRS.tex, SSP_SRS.html
- to address Issue #2156 Item 1
@Nathaniel-Hu Nathaniel-Hu linked a pull request Jun 1, 2020 that will close this issue
@Nathaniel-Hu Nathaniel-Hu reopened this Jun 1, 2020
@Nathaniel-Hu
Copy link
Collaborator

@smiths and @JacquesCarette, am I ok to change the variable names (e.g. totStress -> totNormStress or normStress) for the 3rd item of this issue? Or should I save that for the 4th item?

@smiths
Copy link
Collaborator Author

smiths commented Jun 2, 2020

@Nathaniel-Hu, I'm not sure what change you are referring to. Probably best to stick to only making the changes in step 3. If you have another change to propose, we should discuss it here.

@Nathaniel-Hu
Copy link
Collaborator

@smiths, sorry, what I said was a bit confusing. This is what we have currently for normStress:

--DD10

stressDD :: DataDefinition
stressDD = dd stressQD [makeCite huston2008] Nothing "normStress" []

stressQD :: QDefinition
stressQD = mkQuantDef totStress stressEqn

stressEqn :: Expr
stressEqn = sy fn / sy genericA

where

totStress = uc' "sigma" (cn' "total normal stress")
  "the total force per area acting on the soil mass" lSigma pascal

fn = uc' "F_n" (cn "total normal force") "component of a force in the normal direction"
  (sub cF (Label "n")) newton

For Item 3., I am to introduce a new data definition DD:tangStress that is mostly the same as normStress albeit with some changes. To do that, is it ok if I do something like the following:

--DD10

normStressDD :: DataDefinition
normStressDD = dd normStressQD [makeCite huston2008] Nothing "normStress" []

normStressQD :: QDefinition
normStressQD = mkQuantDef normStress normStressEqn

normStressEqn :: Expr
normStressEqn = sy fn / sy genericA

--DD11

tangStressDD :: DataDefinition
tangStressDD = dd tangStressQD [makeCite huston2008] Nothing "tangStress" []

tangStressGD :: QDefinition
tangStressQD = mkQuantDef tangStress tangStressEqn

tangStressEqn :: Expr
tangStressEqn = sy ft / sy genericA

where

normStress = uc' "sigma" (cn' "total normal stress")
  "the total force per area acting on the soil mass" lSigma pascal

fn = uc' "F_n" (cn "total normal force") "component of a force in the normal direction"
  (sub cF (Label "n")) newton

tangStress = uc' "sigma" (cn' "tangential stress")
 "the total force per area acting on the soil mass" lSigma pascal

ft = uc' "F_t" (cn "tangential force") "component of a force in the tangential direction"
 (sub cF (Label "t")) newton

I'm just somewhat uncertain as to how I should implement the new data definition for tangStress at the moment.

@smiths
Copy link
Collaborator Author

smiths commented Jun 2, 2020

Okay @Nathaniel-Hu, I understand now. I hadn't read carefully enough your early PR; I thought you had already renamed stressDD to `normStressDD'.

Yes, you can do what you describe. As far as tangStress goes, you should do everything with it that is currently done with stressDD (which you are renaming `normStressDD').

Yes, it makes sense to rename to `normStressDD' in this step. In fact, you should do this first, so that you see if there are any unintended consequences of the change.

@Nathaniel-Hu
Copy link
Collaborator

Ok then. thanks for the quick response!

@Nathaniel-Hu
Copy link
Collaborator

Nathaniel-Hu commented Jun 2, 2020

@smiths, I renamed stressDD to normStressDD, and I also updated all references to stressDD to normStressDD. I needed to edit DataDefs.hs, GenDefs.hs and TMods.hs in SSP, and the changes passed the stability tests. These changes may be related to Item 4.

I will do a commit now to document these changes, and then do a later commit to add in the implementation of tangStressDD.

@smiths
Copy link
Collaborator Author

smiths commented Jun 2, 2020

Sounds good @Nathaniel-Hu.

@Nathaniel-Hu
Copy link
Collaborator

@smiths, pending the merger of PR #2160, I've begun looking into how to implement the following change:

  1. GD:resShr currently references DD:stress, this should be changed to referencing DD:normStress and DD:tangStress.

In our discussions, @bmaclach mentioned that the references in RefBy of the DD are generated automatically based upon its use in defining GDs, TMs, IMs, etc. (see below picture for example).

Screen Shot 2020-06-03 at 1 42 59 PM

The reference the GD:resShr in RefBy was made automatically by effecting the following sample change:

Screen Shot 2020-06-03 at 1 45 07 PM

Given these circumstances, @smiths how should I incorporate DD:tangStress into GD:resShr to get this RefBy reference to GD:resShr in DD:tangStress?

@smiths
Copy link
Collaborator Author

smiths commented Jun 3, 2020

@Nathaniel-Hu, I'm not sure of your question. It looks like you have already accomplished what I would like to see. You are correct that DD: normStress and DD: tangStress should appear in the derivation by substituting into TM: mcShrStgth. The screen shots you have above look correct to me. What else are you trying to do?

@Nathaniel-Hu
Copy link
Collaborator

@smiths, what I showed was just a sample implementation. I wasn't sure how you wanted me to implement Item 4 (or that this was how you wanted me to implement it). If this is the correct implementation, then I will save my current changes to either a new branch off of master (pending the merge of PR #2160) or as a new branch off of branch Issue#2156_III.

@JacquesCarette
Copy link
Owner

#2160 is now merged.

@Nathaniel-Hu
Copy link
Collaborator

Thank you.

@smiths
Copy link
Collaborator Author

smiths commented Jun 3, 2020

@Nathaniel-Hu, your sample implementation looks good. Please create a pull request around that. I believe that once that PR is merged, we will be able to close this issue. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment