Adams Car Package > Adams Car > Appendix > Solver Routines (Car)

Solver Routines (Car)

Align or Adjust Suspension

This function runs one or more static solutions, for example, to adjust tie rod length to set desired toe angle. Adams Car adds a call to this function when the assembly contains adjustable forces.
Invoke this function by typing the following command
control/routine=abgFDM::con900, function=USER(afoid,aprid,svs_flg)
where:
 
Description
afoid
=
Id of array containing the all active adjustable force ids.
aprid
=
(Optional) Id of array containing the loading part ids for which mass is not considered during adjustment.
svs_flag
=
(Optional) a flag to output DATOUT.

Calculation of auto trim load

This routine calculates the auto trim load for airspring.
Invoke this function by typing the following command
DIFF/id, IC=0.0
, FUNCTION=USER(1117,tlen,imrk,jmrk)
where:
 
Description
id
=
Diff statement id
tlen
=
Trim length
imrk
=
Id of spring I marker
jmrk
=
Id of spring j marker

Calculation of pitch, roll or side slip angle

This routine computes pitch angle, roll angle, or side slip angle depending upon the flag passed.
The syntax to access the routine is as follows:
VARIABLE /id, IC = 0.0
, FUN=USER (911, type, imrk, jmrk, rmrk, scale, int_branch)
where:
 
Description
type
=
An integer value that specifies the value to be calculated.
1 – pitch angle
2 – roll angle
3 – side slip angle
imrk
=
Id for I marker
jmrk
=
Id for J marker
rmrk
=
Id for Reference marker.
scale
=
1 - kph, 0 mph
int_branch
=
Internal branch id to specify correction to lateral acceleration.
1 - Ay in body frame, corrected with respect to roll and pitch (Ay as Adams measures)
2 - Ay in body frame, uncorrected (Ay as an accelerometer would measure)
3 - Ay in body frame, corrected with respect to suspension roll and pitch
4 - Ay in body frame, uncorrected with respect to suspension roll and pitch

Calculation of sine steering functions

This routine computes the value of a sine sweep having time-varying or constant frequency.
The syntax to access the routine for VARIABLE is as follows:
VARIABLE /id, IC = 0.0
, FUN=USER (routine_code, branch_id, T1, T2, F1, F2, amplitude, TMS)
Routine= abgVDM::var914
The syntax to access the routine for MOTION is as follows:
MOTION /id, JOINT = ijt, type
, FUN=USER (routine_code, branch_id, T1, T2, F1, F2, amplitude, TMS)
Routine= abgVDM::mot914
where:
 
Description
id
=
VARIABLE id for VARIABLE
MOTION id for MOTION
ijt
=
Adams JOINT id to which motion is applied
type
=
type of Adams JOINT
ROT = rotational joint
TRA = translational joint
routine_code
=
Used only when routine= is not specified to dispatch to the proper routine
branch_id
=
Specify branching id.
1 = time-varying linear frequency
2 = time-varying logarithmic frequency
T1
=
Start time used for defining linear/log curve
T2
=
End time used for defining linear/log curve
F1
=
Frequency at T1
F2
=
Frequency at T2.
AMP
=
Amplitude of the signal
TMS
=
Mini-maneuver start time

Notes on Input and Output

For constant frequency sine sweeps, specify branch_id = 1, and ensure f2=f1.

Calculation of steady state controller error

This routine computes the error between the force/torque on a jprim and a desired force/torque. The desired force/torque is always zero. Typically this routine is used in conjuction with all Adams Car static simulations (see User SIMULATE/STATIC Routines) of full vehicle models, where the residual forces on the body to ground jprims and wheel to spindle jprims are driven to zero so that there are no initial transient effects when dynamic simulation is performed immediately following a static simulation.
The syntax to access the steady state controller error is as follows:
VARIABLE /id, IC = 0.0
, FUN = USER (904, gain, jprid, comp,rmrk, gfoid)
, ROUTINE = abgVDM::SteadyStateError
where:
 
Description
gain
=
Controller gain
jprid
=
Id of the jprim whose error is computed.
comp
=
An integer value that specifies the component of the JPRIM force to be computed.
2 - x component of force
3 - y component of force
4 - z component of force
6 - x component of torque
7 - y component of torque
8 - z component of torque
rmrk
=
Id of the marker representing the coordinate system in which the force/torque is measured.
gfoid
=
(optional) Id of GFORCE representing the Tire.

Calculation of steering functions

This routine calculates different steering functions such as RAMP and STEP.

Input:

The syntax to access the routine for VARIABLE is as follows:
VARIABLE/id
, FUNCTION = USER(routing_code, branch_id, T1, T2, fT1, fT2, EPS, TMS, add)
Routine= abgVDM::var912
The syntax to access the routine for MOTION is as follows:
MOTION/id, JOINT = ijt, type
, FUNCTION = USER(routing_code, branch_id, T1, T2, fT1, fT2, EPS, TMS, add)
Routine= abgVDM::mot912
The syntax to access the routine for SFORCE is as follows:
SFORCE/id , FUNCTION = USER(routing_code, branch_id, T1, T2, fT1, fT2, EPS, start_time, add)
Routine= abgFDM::sfo912
where:
 
Description
id
=
VARIABLE id for VARIABLE statement
MOTION id for MOTION statement
SFORCE id for SFORCE statement
ijt
=
Adams JOINT id to which motion is applied
type
=
type of Adams JOINT
ROT = rotational joint
TRA = translational joint
routing_code
=
Used only when routine= is not specified to dispatch to the proper routine
branch_id
=
Specify branching ID,
1 = Ramp
2 = Step
T1
=
Time of first edge
T2
=
Time of second edge
fT1
=
Value of the function f(T1)
fT2
=
Value of the function f(T2)
EPS
=
Environment where rounding off take place
TMS
=
Mini-manuever start time
ADD
=
If set to greater than 1, fT2 = fT1 + FT2

Notes on Input and Output

The edges are rounded off between T1-EPS and T1+EPS respectively between T2-EPS and T2+EPS

Calculation of yaw angle error

This routine computes the error between the displacement (yaw) of the specified marker and the yaw angle specified by the user slip angle in the shadow system.
Invoke this function by typing the following command
DIFF/id, IC=0.0
, FUNCTION=USER(1020 ,imrk,jmrk, gain)
where:
 
Description
id
=
Diff statement id
imrk
=
Id of marker whose displacement is measured.
jmrk
=
Id of marker with respect to which imrk's displacement is measured.
gain
=
Controller gain

Deactivate Initial Condition Motion, jprims, joints and couplers

This routine is been used to deactivate motions, jprims, joints and couplers after static setup phase have completed.
The CONSUB for this event can be invoked by typing the following at the Adams prompt.
CONTROL/FUN=USER (1402,mot_ary,jpr_ary,jnt_ary,cpr_ary,job_flg)
where:
 
Description
mot_ary
=
Id of array containing the necessary motions to deactivate. 
jpr_ary
=
Id of array containing the necessary jprims to deactivate.
jnt_ary
=
Id of array containing the necessary joints to deactivate.
cpr_ary
=
Id of array containing the necessary couplers to deactivate.
job_flg
=
(Optional) flag indicating following scenario
-1 – flag is not set
0 – if initial dcf call
1 – first mini manoeuvre

Move Suspension to Initial Position

For a suspension assembly, this consub runs a quasi-static simulation from time 0 to 1 to position the suspension at the fist point in the loadcase file. Output from Adams Solver to the request, graphics, and results files is suppressed so that plots generated for suspension characteristics versus wheel travel do not have duplicate points. However, to generate output results you can set parameter p26 to 1. If you want to change the number of steps the Solver takes between 0 and 1 seconds, you can set parameter p25 according to Solver stepsize = (1-0)/p25. The default number of steps is 10.
The CONSUB for this event can be invoked by typing the following at the Adams prompt.
control/routine=acarSDM::con950, function=user(950,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26)
 
where:
 
Description
p2
=
Left height variable id (Offset_channel)
p3
=
Right height variable id (Offset_channel)
p4
=
Left tire force id or negative left joint id if no wheels are present
p5
=
Right tire force id or negative right joint id if no wheels are present
p6
=
Left jack force limits array id
p7
=
Right jack force limits array id
p8
=
Left jack force id
p9
=
Right jack force id
p10
=
Left vertical input variable id
p11
=
Right vertical input variable id
p12
=
Left height variable id (Raw_channel)
p13
=
Right height variable id (Raw_channel)
p14
=
Left vertical controller diff id
p15
=
Right vertical controller diff id
p16
=
Vertical feed channel left variable id
p17
=
Vertical feed channel right variable id
p18
=
Loadcase mode 1
p19
=
Loadcase mode 2
p20
=
Dual wheel active (1=yes, 0=no)
p21
=
Left outside wheel force id (if not used, it is either not set or 0)
p22
=
Right outside wheel force id (if not used, it is either not set or 0)
p23
=
Parameter (p1-p22) array id for the second axle (if not used, it is either not set or 0)
p24
=
Parameter (p1-p22) array id for the third axle (if not used, it is either not set or 0)
p25
=
Steps taken for the quasi static simulation from 0 to 1 second (if not set or 0, the default number of 10 steps is used)
p26
=
Output results. If set to 1, the simulation output results are generated (if not set or 0, no output results are generated)

Quasi-Static Milliken Moment Method Analysis

The quasi-static Milliken moment method event allows user to evaluate the stability and handling characteristics of your vehicle model. The CONSUB drives the vehicle at constant longitudinal speed and performs a series of analyses at different side-slip angles and steer angles.
The CONSUB for this event can be invoked by typing the following at the Adams prompt.
CONTROL/FUN=USER (1060,jpr_ary,int_ss,fin_ss,ss_nsteps,str_amp,str_frq,dur,nsteps,bank,str_mot,origo)
where:
 
Description
jpr_ary
=
Id of array containing the necessary jprims, motions, sforce ids to perform the static equilibrium 
int_ss
=
Initial side slip angle in degrees.
fin_ss
=
Final side slip angle in degrees.
ss_nsteps
=
Number of steps for the side slip angle (that is, slip increment = (fin_ss - int_ss)/ ss_nsteps)
str_amp
=
Steering input amplitude in degrees.
str_frq
=
Steering input frequency in degrees.
dur
=
Duration for the output.
nsteps
=
Number of steps for the output.
bank
=
(Optional) bank angle in degrees with default being zero (deg) 
positive value = road banks into corner (that is, outside of turn is higher than inside of turn) 
str_mot
=
(Optional). Steering motion Id. (Default motion id is 735 for Adams Car).
origo
=
(Optional). Marker defining the coordinate system is which model was created. (Standard Adams Car models have vehicle forward as -X). Default marker id is 3

Tire Velocity

This routine will calculate the velocity and angular velocity of the tire belt part.
The syntax to access the Wheel Velocity is as follows:
VARIABLE/id, FUN=USER (906, comp, imrk, jmrk, rmrk)
where:
 
Description
comp
=
Velocity component which need to be calculated:
1 = vx, 2 = vy, 3 = vz
4 = wx, 5 = wy, 6 = wz
imrk
=
I marker of wheel spindle revolute joint
jmrk
=
J marker of wheel spindle revolute joint
rmrk
=
Reference marker in whose coordinate systems the velocities are determined.

Unit vector calculation

This routine will return direction cosine along specified direction.
The syntax to access the Wheel Velocity is as follows:
VARIABLE/id, FUN=USER (907, imrk, jmrk, rmrk, vdir, vcom)
where:
 
Description
imrk
=
Id for I marker
jmrk
=
Id for J marker
rmrk
=
Id for Reference marker.
vdir
=
Vector direction id along which we need to measure:
1 = x
2 = y
3 = z
vcom
=
Resolved vector component whose value is need:
1 = x
2 = y
3 = z