# AceFEM: Arc-Length Method and Load Element

I've got another issue regarding the arc length method. In the analysis below, I introduce a load using a finite element. I then try to solve the problem using arc-length procedure.

First issue is: If there is only load applied through an element (no SMTAddNaturalBoundary) the procedure fails completely with indeterminate number in tangent matrix. Got an idea why but maybe anyone can explain how to overcome this issue?

Second issue: Additionally to the load applied by the element I want to use a SMTAddNaturalBoundary to introduce a force as done in the example code. Now the arc-length procedure does not fail at startup but on convergence. For me it seems to be related to the high difference of the "element"- and the "natural"-load.

Either way can anyone please explain how to resolve this issues?

<< AceFEM;
{nx, ny} = {10, 10};
SMTInputData[];
"OL:SEC2L1DFFLL1Uniform", {"qx *" -> 10^3}}}];
SMTAddMesh[Polygon[{{0, 0}, {1, 0}, {1, 1}, {0, 1}}],
"\[CapitalOmega]", "T1-4", {nx, ny}];
SMTAddEssentialBoundary["X" == 0 &, 1 -> 0, 2 -> 0];
SMTAddNaturalBoundary["X" == 1 &, 2 -> 10^-3];
SMTAnalysis[];

SMTArcLengthSet["\[Lambda]Target" -> 10];
sMax = 100;
s0 = 10^0;
\[CapitalDelta]sMin = 10^-2;
\[CapitalDelta]sMax = 10^0;
SMTNextStep["\[CapitalDelta]\[Gamma]" -> s0];
While[
While[
step =
SMTConvergence[10^-6,
8, \[CapitalDelta]sMin, \[CapitalDelta]sMax, sMax}]
, SMTArcLengthIteration[];
];
If[Not[step[]],
If[SMTData["Multiplier"] >= 1, Break[];];
];
If[step[] === "MinBound", SMTStatusReport["Analyze"];
SMTStepBack[];];
step[]
,
If[step[], SMTStepBack[];, SMTArcLengthNext[];];
SMTNextStep["\[CapitalDelta]\[Gamma]" -> step[]]
];
SMTArcLengthFree[];
SMTData["Multiplier"]
SMTNodeData["X" == 1 && "Y" == 1 &, "at"]


The Indeterminate error and some other ones:

Part::partw: Part 2 of MantissaExponent[Indeterminate] does not exist.

StringJoin::string: String expected at position 2 in S=1 T=0
NR=1 \[Lambda]=<>If[MantissaExponent[Indeterminate][]==0,
(If[StringLength[#1]>10,StringTake[#1,10],#1]&)[ToString[N[MantissaExponent[<<1>>][]]]],
(If[StringLength[Slot[<<1>>]]>10,StringTake[#1,10],#1]&)[ToString[N[<<2>>[[]]]]]<>e<>ToString[MantissaExponent[Indeterminate][]]].


...seem to occur when no derivative of load with respect to multiplier is provided. The errors should not happen if derivatives are missing (maybe a warning should be given), so this should be corrected by the Author, but you still need the derivatives of all the loads with respect to multiplier if you want to achieve the convergence of ArcLength procedure.

By using SMTAddEssentialBoundary[]; and/or SMTAddNaturalBoundary[]; commands you automatically introduce those derivatives (unless you specify all loads as 0, then the error is still there). However the elements in the library e.g. "OL:SEC2L1DFFLL1Uniform" are older and are missing the SMSStandardModule["User 1"] subroutine (see your first ArcLength related question). You need to download the Mathematica code from AceShare and add the missing "User 1" and export the SMSD[Rg,multiplier] to p$$. Then it should not produce any errors if you skip SMSNaturalBoundary[] and it should also converge properly if you have a well defined problem. The new library ML, does not have any load elements, since AceFEM was extended to allow for more load customization thus making the standard load elements obsolete. • Thanks again for the answer Blaz I really appreciate! Do I get it right that this "User 1" subroutine is called automatically by the arc-length procedure? Is it in general possible to define tasks that load and modify the element matrices by loading them with "AdditionalArguments" -> Real[p$$[SMSNoDOFGlobal]] ? – Sascha Maassen Apr 21 '17 at 8:37
• Yes "User 1" is called each time the SMTArcLengthIteration[] is called if it exists. If no derivatives are provided by "User 1" or Boundary conditions, then we get this Indeterminate errors. I do not think that you can set Additional Arguments, but Tasks have already availiable input. You can use the "RealInput" -> {...} and/or "IntegerInput" -> {...}`, which sizes you define in the task code after type and you can red the input there. You can also use tasks type 4 or 5 to recalcualte the R or K and modify them directly in the task and exporting them, without prviding them as input. – BHudobivnik Apr 21 '17 at 9:35
• I have some problems which cannot be solved using Newton-Raphson iterative procedure due to some instabilities that I have. So I decided to use the Arc length method. But I do not understand the command SMTArcLengthSet[]. How should it be defined? Could you please explain? – KratosMath Jun 15 '18 at 20:57