Author: richefeu Date: 2009-05-28 11:24:36 +0200 (Thu, 28 May 2009) New Revision: 1782
Added: trunk/pkg/dem/Engine/EngineUnit/BasicViscoelasticRelationships.cpp trunk/pkg/dem/Engine/EngineUnit/BasicViscoelasticRelationships.hpp Modified: trunk/pkg/dem/SConscript Log: Add BasicViscoelasticRelationships: an alternative to SimpleViscoelasticRelationships. It accounts for the effective mass of each contact and considere the parameter cn as a dimensionless ponderation of its critical value (computed for each contact). Parameter cs is set to zero for the moment. Added: trunk/pkg/dem/Engine/EngineUnit/BasicViscoelasticRelationships.cpp =================================================================== --- trunk/pkg/dem/Engine/EngineUnit/BasicViscoelasticRelationships.cpp 2009-05-25 06:29:19 UTC (rev 1781) +++ trunk/pkg/dem/Engine/EngineUnit/BasicViscoelasticRelationships.cpp 2009-05-28 09:24:36 UTC (rev 1782) @@ -0,0 +1,58 @@ +/************************************************************************* +* Copyright (C) 2009 by Vincent Richefeu * +* [email protected] * +* * +* This program is free software; it is licensed under the terms of the * +* GNU General Public License v2 or later. See file LICENSE for details. * +*************************************************************************/ + +#include"BasicViscoelasticRelationships.hpp" +#include<yade/pkg-dem/SimpleViscoelasticBodyParameters.hpp> +#include<yade/pkg-dem/ViscoelasticInteraction.hpp> +#include<yade/pkg-dem/SpheresContactGeometry.hpp> +#include<yade/core/Omega.hpp> +#include<yade/core/MetaBody.hpp> + + +BasicViscoelasticRelationships::BasicViscoelasticRelationships() +{ +} + + +void BasicViscoelasticRelationships::registerAttributes() +{ +} + + +void BasicViscoelasticRelationships::go( const shared_ptr<PhysicalParameters>& b1 // SimpleViscoelasticBodyParameters + , const shared_ptr<PhysicalParameters>& b2 // SimpleViscoelasticBodyParameters + , const shared_ptr<Interaction>& interaction) +{ + if( !interaction->isNew ) return; + + SimpleViscoelasticBodyParameters* sdec1 = static_cast<SimpleViscoelasticBodyParameters*>(b1.get()); + SimpleViscoelasticBodyParameters* sdec2 = static_cast<SimpleViscoelasticBodyParameters*>(b2.get()); + + interaction->interactionPhysics = shared_ptr<ViscoelasticInteraction>(new ViscoelasticInteraction()); + ViscoelasticInteraction* contactPhysics = YADE_CAST<ViscoelasticInteraction*>(interaction->interactionPhysics.get()); + + // Check that cn is dimensionless + if (sdec1->cn >= 1.0) std::cout << "Warning: non dimensionless value for cn" << std::endl; + + // Arbitrare ponderation... + contactPhysics->kn = 0.5 * (sdec1->kn + sdec2->kn); + contactPhysics->ks = 0.5 * (sdec1->ks + sdec2->ks); + contactPhysics->cn = 0.5 * (sdec1->cn + sdec2->cn); + contactPhysics->cs = 0.0; // not viscosity in the tangent direction + + // in fact, dimensionless cn is a ponderation of the critical value cn_crit = 2sqrt(kn*meff) + contactPhysics->cn *= 2.0 * sqrt(contactPhysics->kn * ((sdec1->mass * sdec2->mass) / (sdec1->mass + sdec2->mass))); + + contactPhysics->tangensOfFrictionAngle = std::tan(std::min(sdec1->frictionAngle, sdec2->frictionAngle)); + + contactPhysics->shearForce = Vector3r(0,0,0); + contactPhysics->prevNormal = Vector3r(0,0,0); + +} + +YADE_PLUGIN(); Added: trunk/pkg/dem/Engine/EngineUnit/BasicViscoelasticRelationships.hpp =================================================================== --- trunk/pkg/dem/Engine/EngineUnit/BasicViscoelasticRelationships.hpp 2009-05-25 06:29:19 UTC (rev 1781) +++ trunk/pkg/dem/Engine/EngineUnit/BasicViscoelasticRelationships.hpp 2009-05-28 09:24:36 UTC (rev 1782) @@ -0,0 +1,36 @@ +/************************************************************************* +* Copyright (C) 2009 by Vincent Richefeu * +* [email protected] * +* * +* This program is free software; it is licensed under the terms of the * +* GNU General Public License v2 or later. See file LICENSE for details. * +*************************************************************************/ + +#pragma once + +#include<yade/pkg-common/InteractionPhysicsEngineUnit.hpp> + +/// Determine elastic stiffnesses and viscous parameters from elastic and dimensionless viscoelastic parameters +/// of the interacting bodies +class BasicViscoelasticRelationships : public InteractionPhysicsEngineUnit +{ + public : + + BasicViscoelasticRelationships(); + + virtual void go( const shared_ptr<PhysicalParameters>& b1, + const shared_ptr<PhysicalParameters>& b2, + const shared_ptr<Interaction>& interaction); + + protected : + virtual void registerAttributes(); + + FUNCTOR2D(SimpleViscoelasticBodyParameters,SimpleViscoelasticBodyParameters); + REGISTER_CLASS_NAME(BasicViscoelasticRelationships); + REGISTER_BASE_CLASS_NAME(InteractionPhysicsEngineUnit); + +}; + +REGISTER_SERIALIZABLE(BasicViscoelasticRelationships); + + Modified: trunk/pkg/dem/SConscript =================================================================== --- trunk/pkg/dem/SConscript 2009-05-25 06:29:19 UTC (rev 1781) +++ trunk/pkg/dem/SConscript 2009-05-28 09:24:36 UTC (rev 1782) @@ -990,6 +990,13 @@ ,'SpheresContactGeometry' ]) + ,env.SharedLibrary('BasicViscoelasticRelationships' + ,['Engine/EngineUnit/BasicViscoelasticRelationships.cpp'] + ,LIBS=env['LIBS']+['SimpleViscoelasticBodyParameters' + ,'ViscoelasticInteraction' + ,'SpheresContactGeometry' + ]) + ,env.SharedLibrary('ContactLaw1', ['Engine/StandAloneEngine/ContactLaw1.cpp'], LIBS=env['LIBS']+['SDECLinkPhysics', _______________________________________________ Mailing list: https://launchpad.net/~yade-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-dev More help : https://help.launchpad.net/ListHelp _______________________________________________ yade-dev mailing list [email protected] https://lists.berlios.de/mailman/listinfo/yade-dev
