← Back to team overview

yade-users team mailing list archive

Re: How to keep a constant stress boundary?

 

> Wait a minute!! You mean you implemented periodic boundary conditions?!
... yes ...
>   
> If I understand, the only question, appart from writing the code, is how 
> to define the stress in X,Y,Z (could be done using Love-Weber stress 
> computed on contacts, or perhaps you did something already?) and the 
> stiffness of the sample.
> How to control the stress, is there some adjustable X,Y,Z lengths of the 
> period, somewhere?

I wrote Shop::totalForceInVolume, which computes stiffness and force
just for that purpose. I am not sure it is physically correct, but
should be: if you sum forces on all interactions (abs values of the
components, that is), you get some summary force in the whole
simulation. Dividing that force e.g. z-component by xy area of the
periodic cell, you have average stress in the z sense, right?

I would be glad if you could check that Shop::totalForceInVolume.

Some control code is in PeriIsoCompressor, you can take that as
inspiration, I think it is quite readable:

Vector3r cellSize=rb->cellMax-rb->cellMin;
Vector3r cellArea=Vector3r(cellSize[1]*cellSize[2],cellSize[0]*cellSize[2],cellSize[0]*cellSize[1]);
Vector3r sumForces=Shop::totalForceInVolume(avgStiffness,rb);
Vector3r sigma=Vector3r(sumForces[0]/cellArea[0],sumForces[1]/cellArea[1],sumForces[2]/cellArea[2]);
// etc.

The cell is defined in MetaBody::cellMin and MetaBody::cellMax (corners
of the cell) and MetaBody::isPeriodic==true. You can change cell corners
as you want.

Oh, important note: constitutive laws that as bodies for their
coordinates (such as ElasticContactLaw) will not work with periodic
boundaries; the periodicity information is injected into the interaction
and interaction geometry functor receives adjusted se3's of the bodies.

Law2_Dem3Dof_Elastic_Elastic will work just fine however (Dem3Dof saves
se3 of bodies inside itself, which is faster and has this (unplanned)
feature of using fake body coordinates instead of the real ones).

Cheers, Vaclav




Follow ups

References