Thanks! It works. By the way, I find I have to compile Chrono after modifying the source code. Here's the tutorial on how to compile Chrono, https://api.projectchrono.org/development/tutorial_install_chrono.html If you want want to check whether your Chrono is updated, you can check this file: D:/Chrono_v7_build/lib/Release/ChronoEngine.lib
Thanks, Qihan On Tuesday, June 14, 2022 at 3:08:03 PM UTC-4 [email protected] wrote: > In the core module of Chrono, you can modify your contact force model in > this file, src/chrono/physics/ChContactSMC.h > > The function you need to look at is CalculateForce() > > > > ChVector<> CalculateForce( > > double delta, ///< overlap in normal direction > > const ChVector<>& normal_dir, ///< normal contact direction > (expressed in global frame) > > const ChVector<>& vel1, ///< velocity of contact point > on objA (expressed in global frame) > > const ChVector<>& vel2, ///< velocity of contact point > on objB (expressed in global frame) > > const ChMaterialCompositeSMC& mat ///< composite material for > contact pair > > ) > > > > The following two lines match the equations you screenshotted. Note that > kn, gn, kt, gt are computed differently depending on the contact force > model you choose. forceN and forceT are normal and tangential force > magnitude. > > > > // Calculate the magnitudes of the normal and tangential contact > forces > > double forceN = kn * delta - gn * relvel_n_mag; > > double forceT = kt * delta_t + gt * relvel_t_mag; > > > > You can implement the model however you want. > > > > Thank you, > > Luning > > On Tuesday, June 14, 2022 at 12:59:22 PM UTC-5 [email protected] wrote: > >> Hi all, >> >> I have a question about changing the contact model in the Chrono. By the >> way, I am using (the core module of) Chrono. >> The viscoelastic model shows the damping term is proportional to >> velocity. Can we change it? >> [image: 4.png] >> We are studying fish motion on mud, which is shear-thinning >> <https://en.wikipedia.org/wiki/Shear_thinning> interaction. For example, >> we hope the damping term is proportional to the square root of the >> velocity. Can it be tuned by ourselves? >> >> >> Thanks, >> Qihan >> > -- 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/bbaca2da-0e2b-4467-a197-5907b07d16d4n%40googlegroups.com.
