TAGGED: ansys-mechanical, apdl, multiple-load-steps, static-structural
-
-
April 17, 2023 at 12:26 pm
Breno Vincenzo de Almeida
SubscriberI would like to perform multiple static analyses changing the stiffness properties of a spring (COMBIN14). According to its documentation, the stiffnesses can be given in a table, setting TIME as the primary variable. But I cannot get the solution to consider all stiffness values in a single session.
Following is a minimum example that does not work, only showing the solution for the first value of the table. It isn't clear in the documentation how to change the TIME for linear static analyses. I tried changing the TIME manually in a *DO-*ENDDO loop, but that either doesn't work or shows a warning message about non-standard use, which according to the COMBIN14 documentation, should be standard.
Edit 1: added missing Dirichlet boundary condition to spring nodes. The results still only show one solution (one set, one TIME, one LOAD STEP...), that for a zero stiffness spring.ÂEdit 2: Fixed code. It should work now, as expected.ÂFINI/CLEAR/FILNAME, mwe/TITLE, mweÂ/PREP7! element typesET, 1, PLANE42,,1,2Â Â ! simple elastic plane strainÂET, 2, COMBIN14,,2Â Â ! spring in Y directionÂ! propertiesÂMP, EX, 1, 200E6MP, PRXY, 1, 0.29Âmax_stiff = 10**9Â ! maximum spring stiffnessÂn_stiff = 5Â ! number of stiffness incrementsÂ! table of stiffness values*DIM, k_tab, TABLE, n_stiff, , , TIMEk_tab(0,1) = 1Â Â ! zero-th row, first column*VFILL, k_tab(1,0), RAMP, 1, 1Â ! zero-th column, 1 to n_stiff*DO, i, 2, n_stiff, 1Â Â k_tab(i) = 10**(LOG10(max_stiff)*i/n_stiff)*ENDDOÂ! real constants for COMBIN14 using k_tabR, 1, %k_tab%Â ! I don't know how to use thisÂ! meshN, 1, 0.0, 0.0N, 2, 0.1, 0.0N, 3, 0.0, 0.1N, 4, 0.1, 0.1ÂN, 5, 0.0, 0.2N, 6, 0.1, 0.2ÂTYPE, 1E, 1, 2, 4, 3ÂTYPE, 2REAL, 1E, 3, 5E, 4, 6ÂFINIÂ/SOLUÂSELTOL, 1E-15ÂNSEL, S, LOC, Y, 0D, ALL, ALL, 0ALLSELÂ! Edit 1: forgot to clamp upper spring nodesNSEL, S, LOC, Y, 0.2
D, ALL, ALL, 0
ALLSELÂNSEL, S, LOC, X, 0.1NSEL, R, LOC, Y, 0.1F, ALL, FX, 1000F, ALL, FY, 1000ÂALLSELÂANTYPE, STATIC, NEWEQSLV, SPAR, 0,Â!SOLVEÂ ! this was here previously to edit 2Â! Edit 2: now working as intendedNROPT, FULLÂ ! THIS IS THE MISSING PIECETM_START = 1 Â Â Â Â Â Â Â ! start time
TM_END = n_stiff      ! ending time
TM_INCR = 1 Â Â Â Â Â Â Â Â ! time increment
*DO, TM, TM_START, TM_END, TM_INCR
  TIME, TM  ! set time
  SOLVE
*ENDDOÂFINIÂ/POST1SET, FIRSTESEL, S, TYPE, , 1/EFACET, 1PLNSOL, U, SUM, 2, 1.0/CONTOUR,1,64,AUTO,,/REPLOTÂ
-
April 18, 2023 at 2:12 pm
dlooman
Ansys EmployeeYour approach is OK. The spring will stiffness will update based on the time specified by the TIME command, even in a static analysis. The reason you didn't get expected results is because you didn't constrain the end of the combi14 elements. Commands like nsel,s,loc,y,0.2 and d,all,all are required.
-
April 18, 2023 at 2:29 pm
Breno Vincenzo de Almeida
SubscriberThank you Dave. I've added the missing constraints, but I still only obtain the result for the first spring value of the table, not one solution for each of them.
In Main Menu > General Postproc > Results Summary:
  SET  TIME/FREQ   LOAD STEP  SUBSTEP  CUMULATIVE
   1     1.0000         1          1          1      -
April 18, 2023 at 2:50 pm
dlooman
Ansys EmployeeIn my test my solution input was like below. That seems similar to your do-loop, so I don't know why you only got one solution. The R command shouldn't be in the loop. It only needs to be defined once, prior to solution. When debugging do-loops I put a /gopr command after the *do so I get output for each loop. Otherwise you only get output for the first time through the loop. You could try my commands instead of the do-loop as a "sanity test."
/solu
time,1
solve
time,2
solve
time,3
solve
time,4
solve
time,5
solve
Â
-
April 18, 2023 at 3:20 pm
Breno Vincenzo de Almeida
SubscriberAh, I see what you mean. But if I do what you're saying, without explicitly modifying R within the loop (or between explicit time/solve commands), the spring stiffness value does not change throught the TIMEs, staying equal to the initial one. This can be verified by plotting the solution for each SET.
-
April 18, 2023 at 3:30 pm
dlooman
Ansys EmployeeI checked the force in the spring for each solution: esel,s,enam,,14 presol,f Â
The force in the spring changed at each time point. The displacement didn't change, possibly because the element was still much stiffer than the spring.
-
April 18, 2023 at 3:49 pm
Breno Vincenzo de Almeida
SubscriberWell that's odd! When I set R,1,max_stiff (where max_stiff=10**9, as in the original post) instead of the k_tab table, and perform only one static analysis, the displacements change significantly (almost no vertical displacements).
-
April 18, 2023 at 4:18 pm
dlooman
Ansys EmployeeWhat's AE/L for the little element? 200e6? 1e9 would be significant compared to that. Let me check why UY doesn't change with the table tomorrow.
-
April 19, 2023 at 3:53 pm
dlooman
Ansys EmployeeThe program isn't updating the stiffness matrix after the first solution. If I add the command nropt,full or nlgeom,on to the solution, then the results start to make sense.
-
April 19, 2023 at 4:25 pm
Breno Vincenzo de Almeida
SubscriberWhoa. That worked! Odd, shouldn't Newton Raphson options only be relevant to non-linear analyses?
After running with NROPT, FULL and going to Main Menu > Analysis Type > Sol'n Controls, it seems everything is still linear with Small Displacement Static option.
I tried seeing if setting NROPT, FULL changes some sort of solver flags under the hood, but couldn't find anything just by reading the docs.
-
April 19, 2023 at 4:41 pm
dlooman
Ansys EmployeeI just know from experience that nropt,full will force a new solution at each load step. nlgeom,on would make more sense to use in your case. It doesn't necessarily make sense that you have to force it, but if the program doesn't think the model is nonlinear, it doesn't reform the matrices at each load step. Â
-
April 19, 2023 at 4:51 pm
Breno Vincenzo de Almeida
SubscriberI agree that nlgeom,on would make more sense in general. But in this particular case, if a real constant set is changing for each time step according to a give table, even if the model is linear, then the matrices should be reformed at each load step, right?
It would be nice if this were added to the docs. Maybe even to COMBIN14.
Anyway, thank you very much for your time Dave! I'm marking the post as answered.
-
- The topic ‘APDL: real constant defined in a table for static analysis’ is closed to new replies.
-
5879
-
1906
-
1420
-
1306
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.