I am trying to extract information about the contact incidents in Adams, in order to exact the times at wich more than 1 gear tooth pair of an involute gear model come into contact. I understand that after the simulation, I can look at the contact incidents and tracks, but if possible, I'd like to be able to extract the incidents during simulation, in the form of measurements.
Measures in Adams are predefined and computed during run-time. However, the contact incidents and the number of them is not something that you define before the simulation. As such we create the contact tracks in the post processor as a post processing action on the contact incidents.
You certainly can control the contact tracks so that you can achieve what you are looking for. To do this, you can go to Tools > Command Navigator > analysis > collate_contacts:
and select the analysis and contact objects of interest. Now by providing a small tolerance value, you will be able to combine contacts incidents that are very close to one another in an attempt to isolate different portions of your contact region that occur at different times.
To learn more about the analysis collate_contacts command, please refer to the Adams Online Help and navigate to:
As you decribed in great detail, I can access and manipulate the contact incidents through the tolerance value at collate_contacts. This however means that I can only access the contact incidents only after the simulation.
To clarify, I'd like to mention my full problem, so that I may better explain it.
I am building a model with a pair of involute gears in contact. During simulation, the gears mesh in a 1-2-1 tooth manner i.e., the number of teeth during contact changes at a certain frequency. This results in the well known time varying stiffness of involute gears.
As I understand it, Adams acounts for the different number of teeth coming into contact in the form of recognizing that another part of the gear's geometry comes into contact, thus increasing the contact force. However, the contact stiffness still remains the same (even though it should also increase).
What I was hoping to achieve is to set up a contact stiffness runtime function expression, in which by measuring "something that would tell me that another tooth just came into contact" in Adams, the contact stiffness would change accordingly.
e.g. I could measure the value of the contact force and when its value increases above a certain threshold (meaning that another tooth pair just came into contact), I could have a runtime expression increasing the contact stiffness. This however is not efficient, since the contact force is directly related to the stiffness itself. As such, I am attempding to adentify the extra tooth contact in a different manner, hence the need to identify the contact incident during runtime.
To summarize, what I would like to know is if there is a way to identify the second tooth pair coming into contact during runtime, wheter it be through the contact tracks or not. Otherwise, my only option would be to examine the contact tracks, identify the frequency at which the second tooth pair comes into contact and set up a predifined contact stiffness function changing according to time only.
When you have the two gears with 1-2-1 mesh, the OVERALL stiffness between the two gears will vary. However, the stiffness of each contact point will be the same all the way through. So I am not sure why you would want to change the contact stiffness because of the meshing.
There are no direct functions for getting the detailed contact incidents during runtime.
What you can do is to use a CNFSUB subroutine for the 3D contact force between the two gears. The same CNFSUB will be called for all of the contact incidents, hence you will have to do some clever monitoring of the contact point locations fed into the CNFSUB to find out which one of the contact incidents is currently active.
As Henrik indicated, we currently do not provide access to detail contact info during run-time unless you use the CNFSUB user-written subroutine. Please also note that to update the contact stiffness during run-time, you would need to use CNFSUB, because the default CONTACT object/statement only accepts constant stiffness values.
One other approach that you may be able to take advantage of for detecting contact of various gear teeth is to split the geometry of each gear such that each tooth is a separate geometry. Then you can create many CONTACT elements out of the combinations of these tooth pairs. This bring two other advantages: (1) nodal contact detection algorithm will run faster as it now deals with smaller geometries rather than the whole gear geom. and (2) you can take the most from SMP with multiple contacts. It may be worth a try to see if you can decrease run times.
That is very helpful, thank you. However this would also increase the number of contacts in the model. Wouldn't that increase the calculations time significantly? Considering that my model has two gears of 24 and 16 teeth, there would be at least 24 contacts.
p.s.
Unless the computations time doesn't increase because no more than two teeth come into contact simultaneously.
When cutting up the gears like that you would need 24x16 contacts in the general case. (You could probably get away with less since the contact pattern between the gears would be quite periodic.)
However, I would also expect that the computation time would go up.
I see. To be honest the split geometry contact scenario would not suit my case, as I would also like to make the contacting bodies flexible at a later stage.
I have been trying to set up a user_defined_subroutine for a couple of months now for this specific case, but I had no luck in figuring out how to actually set up the functions before compiling them to a dll, or how to couple that dll with Adams. I have also previously asked a relative question here (I believe Henrik had answered me at the time)
I don't know if I have acces to direct support, but would it be possible to arrange an online call, to explain to me how to set-up the user defined functions and subroutines? If not, is it possible that I am presented with an example of working code, i.e. the functions contained in the dll, the custom solver(that if I am not mistaken is created during coupling with the dll) and a benchmark case model. I would like to examine how the function inputs and outputs are passed to and from Adams since as far as I can tell, both the CNFSUB and all other indented functions (like c_impact) are defined as void.
where we discuss: Supported compilers; Order of installation of compilers; Starting an Adams shell; Determining installed compiler versions; Finding examples; Language Reference; Compiling; Referencing the subroutine in an Adam model; Passing information into the subroutine; Getting into debug mode
To see an example of a custom CNFSUB and CFFSUB, I recommend that you refer to the following SimCompanion articles:
I did manage to grasp some understanding of the way subroutines work thanks to the documentation you provided, I do however still have some gaps:
1) Is it possible to use FORTRAN subroutines when using the CXX solver?
2) In both the C and FORTRAN contact subroutines, the impact and error functions are called to calculate the forces. I understand that the c_impact function is defined in the slv_c_utils.h file, but I can't find something similar for the FORTRAN subroutine. Unless since FORTRAN uses subroutines, they need not be defined beforehand.
3) Regardless of the programming language, I could not find the impact functions anywhere. As I understand it, the impact function estimates the Normal Contact force as:
Fn = K*g**e + step(g,0,0,dmax,cmax)dg/dt
Shouldn't this function be defined somewhere? Or is it that I can write an impact function/subroutine to use?