Hi Thorsten,

The characteristic of a shock can be specified as:

  1.  Linear damper:  F = -C * v
where v is the rate of change of the shock length (= rate of change of shock 
deformation).
In a JSON specification file, all you need to provide is the constant C through 
the key “Damping Coefficient”.
  2.  Nonlinear damper: F = -mapC(v)
where mapC is some nonlinear function of v.
In a JSON file, you provide mapC as a N-by-2 table of pairs [v_i, mapC_i] using 
the key “Shock Curve Data” (in other words, you provide data at N velocity 
values and this data will be used for piecewise linear interpolation).
  3.  General nonlinear map: F = -map(l – l0, v)
where map is a nonlinear function of both shock deformation and its rate of 
change (this is needed for some special types of shocks that depend on both).
To provide this information in a JSON file, I had to somehow encode a 3D table. 
 This is done by providing M values for the deformation (“Deformation” key) and 
then a table (key “Map Data”) of size N-by-(1+M) which contains in each row a 
value v_i and the values map_ij (for j=1,…,M).  This data is used for a 2D 
piecewise linear interpolation.

Note that the underlying implementation of the shock uses a ChTSDA force 
element which accepts an arbitrary functor (derived from 
ChLinkTSDA::ForceFunctor<https://github.com/projectchrono/chrono/blob/f33df6e81e9192790ee9e1d91d666e44e4331a40/src/chrono/physics/ChLinkTSDA.h#L111>).
 If you write your own C++ class for a concrete wheeled vehicle suspension, you 
can use that to implement any nonlinear function of both length and length rate 
of change (by overriding the evaluate() method).  For suspension shocks (and 
springs) specified in a JSON file, I provide the 3 approximations above (based 
on scalar or tabular data and using piecewise linear interpolation where 
needed).

ChSubsysDefs.h<https://github.com/projectchrono/chrono/blob/main/src/chrono_vehicle/ChSubsysDefs.h>
 and 
ChSubsysDefs.cpp<https://github.com/projectchrono/chrono/blob/main/src/chrono_vehicle/ChSubsysDefs.cpp>
 contains several predefined derived functors of type ChLinkTSDA::ForceFunctor 
(mostly used when reading a suspension specification from a JSON file, but 
which could also be used in a user-provided suspension implementation file).

See 
HMMWV_DoubleWishbone.cpp<https://github.com/projectchrono/chrono/blob/main/src/chrono_models/vehicle/hmmwv/suspension/HMMWV_DoubleWishbone.cpp>
 or 
FEDA_DoubleWishbone.cpp<https://github.com/projectchrono/chrono/blob/main/src/chrono_models/vehicle/feda/FEDA_DoubleWishbone.cpp>
 for examples of user-provided shock functor.

See the JSON files for the HMMWV 
suspensions<https://github.com/projectchrono/chrono/tree/main/data/vehicle/hmmwv/suspension>
 for examples of #1 and #3 above.

--Radu

From: [email protected] <[email protected]> On Behalf 
Of Thorsten Wittenator
Sent: Wednesday, January 24, 2024 11:50 AM
To: ProjectChrono <[email protected]>
Subject: [chrono] Structure of the Shock JSON spec

Hi all,

I am currently working on creating a digital twin for an existing car in 
Chrono. I am currently using the DoubleWishbone suspension template since I 
faced numerical instabilities with the ReducedDoubleWishbone suspension 
version. Moving most of the data was not a problem, but I was a little lost at 
the shock element. What exactly is specified in the Deformation and Map Data 
attributes? Is it damper travel in "Deformation" that is used to index the "Map 
Data" columns starting from the second entry? Is the first the deformation 
velocity? I have a damper that has a constant damping force over the damper 
travel and only depends on the velocity of the deformation. Would I then only 
have one or two dummy entries in each row of "Map Data" ? I tried to answer my 
questions with the documentation but couldn't find too much on that.

Sincerely,
Thorsten
--
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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/ef5a2efa-a1c8-44fb-acae-e75b257fe893n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/ef5a2efa-a1c8-44fb-acae-e75b257fe893n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/PH0PR06MB823788E99586624F8D46E3B8A77A2%40PH0PR06MB8237.namprd06.prod.outlook.com.

Reply via email to