get unit system in source code

Submitted by VBaric on Wed, 11/02/2016 - 08:47

Hello everybody,

I have made some adjustments in the contact models to suit my purpose but that included hard coding a length into the tangential history model.
I have decided now to switch the unit system from si to nano and I was wondering if there is a way to set a value depending on the unit system.
Here a code example showing the idea:

if (units=="si"){
adjustLen = a;
} else if (units =="nano"){
adjustLen = b;
}

I just don't know how to access the units. Can anybody tell me?

Regards
VBaric