Hi Roger,
This appears to be a bug in the nonlinear static analysis.
I didn’t implement this, so I’m not exactly sure what the thought process was but it’s certainly flawed. There is a static analysis -- so-called “incremental” -- where the external load is applied incrementally (over a given number of iterations, by default 6). However, this load scaling was also used for ChStaticNonLinearAnalysis (which is what you end up running when you call sys.DoStaticNonlinear). But that is incorrect: indeed, the scaling goes to 1.0 after the specified number of “incremental steps” but, if the nonlinear solver converges in fewer iterations than that, you end up with a solution corresponding to the incorrect load.
I pushed a fix where I removed this “incremental scaling” from all static analysis algorithms, except the one that is meant to use it.
With that, your code generates the expected results.
By the way, you can explicitly create an analysis object so that you can optionally modify various parameters and options. Instead of:
system.DoStaticNonlinear()
use:
static_analysis = ChStaticNonLinearAnalysis()
static_analysis.SetMaxIterations(20)
static_analysis.SetCorrectionTolerance(1e-4, 1e-8) # test on correction vector
#static_analysis.SetResidualTolerance(1e-8) # test on residual vector
static_analysis.SetVerbose(True)
system.DoStaticAnalysis(static_analysis)
If I recall correctly, you are using a PyChrono conda package. It will take a little bit longer until we build and upload new conda packages. You can wait for those, or else build PyChrono from sources yourself.
--Radu
--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
projectchron...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/projectchrono/4f0211fc-e642-4e2f-89d4-583c1e267f13n%40googlegroups.com.
Roger – new PyChrono conda packages are available at https://anaconda.org/channels/projectchrono/packages/pychrono/files. Look for files ending with “_45”.
To view this discussion visit https://groups.google.com/d/msgid/projectchrono/d0b0424f-f7c3-4e40-a8a7-4ece597a4567n%40googlegroups.com.