Defining elementpairs with different material properties

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Defining elementpairs with different material properties

Ali Ki
Hi,

I need to define different material properties (Young's modulus ...) for the connections (elementpairs) between the DEM elements. How can I do that?
I will appreciate any information on this. :)

Thanks,
Ali
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Damien André
Administrator
Hello, here you can see an example of the input file with different properties. The trick consist in defining multiple SetOf ElementPair


<GranOO Version="2.0" TotIteration="20000" OutDir="Test" ThreadNumber="3">  
   
  <PreProcessing>
    <PlugIn Id="_ReadDomain" FileName="../gdd/cn10/cube-0.0022_cn-10-sample-1-frac-0.25.agdd"/>
    
    <PlugIn Id="_ConvertElementPairToBeam" Set="matrix" YoungModulus="677.94093585e9"
    	    RadiusRatio="0.34769595"/>
    
    <PlugIn Id="_ConvertElementPairToBeam" Set="interface" YoungModulus="4646.13975117e9"
    	    RadiusRatio="0.293703284839"/>
    
    <PlugIn Id="_ConvertElementPairToBeam" Set="inclusion" YoungModulus="4646.13975117e9"
    	    RadiusRatio="0.293703284839"/>

etc................

Have a nice day, Damien.
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Ali Ki
Thank you so much.
Just one more question. I am trying to define a set of elementpair, but not successful yet.
How can I do that?
Would you give me a hand, please?
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Damien André
Administrator
Sorry, If you want some help, you must give me an hint. How did you try to define element pair ?
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Ali Ki
Well, I want to define a set named "hardE". I have made my elements using DEM::ElementPair. Then, I started with this line:

auto& hardSet = * new DEM::ElementPair::Set("hardE");

Now, I don't know how to add (address) the specific elements to hardSet.

To define sets of discrete element, it's pretty easy. But to define sets of element pair, I am lost.
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Damien André
Administrator
Hello, You should try something like that
for (auto& elpair : Core::SetOf<ElementPair>::Get("Global"))
 {
  auto& el1 = elpair.Item1(); // this is a discrete element 
  auto& el2 = elpair.Item2(); // this is a discrete element 
  if (el1.GetPosition().x() > 1) // your condition here
    hardSet.AddItem(elpair);
 }

(I do not test this code snippet)
Damien.
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Ali Ki
Thanks bro!
This is what I did:

auto& hardSet = * new DEM::ElementPair::Set("hardMat");
for (auto& elpair : Core::SetOf<DEM::ElementPair>::Get("Global"))
 {
  auto& el1 = elpair->Item1(); // this is a discrete element
  auto& el2 = elpair->Item2(); // this is a discrete element
  if (el1.GetPosition().x() > 1) // your condition here
    hardSet.AddItem(elpair);
 }

and
<PlugIn Id="_ConvertElementPairToBeam" Set="hardMat" YoungModulus="10e9" RadiusRatio="0.6" PoissonRatio="0.3" MaxStress="0" />

But I receive this error:

####################################################
# An error was encountered ! The program must stop #
####################################################
You have to fix this problem, you may browse the source files to get more informations...
line      : 59
in file   : /home/ali/granoo/tags/2.0/Lib/GranOO/libCore/SetOfMap.tpp
condition : 'map_.count(set.GetId()) == 0'
======================
-- Attached message --
======================
Core::SetOf<Core::Pair<DEM::Element>> with Id=harddd is already used
my-project.exe: /home/ali/granoo/tags/2.0/Lib/GranOO/libUtil/Macro.cpp:65: static void GranOO::Util::AssertMsg::RaiseUserAssertion(int, const string&, const string&, const string&): Assertion `0' failed.
Aborted (core dumped)

What do you think?
Thanks for all the helps :)
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Damien André
Administrator
Hello,
Ali Ki wrote
####################################################
# An error was encountered ! The program must stop #
####################################################
You have to fix this problem, you may browse the source files to get more informations...
line      : 59
in file   : /home/ali/granoo/tags/2.0/Lib/GranOO/libCore/SetOfMap.tpp
condition : 'map_.count(set.GetId()) == 0'
It means that a SetOf does not exist. This assertion is probably raised when the plugin "_ConvertElementPairToBeam" is triggered.
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Ali Ki
I tried to follow your guide. Looks I am missing something. What do you think is missing?
Reply | Threaded
Open this post in threaded view
|

Re: Defining elementpairs with different material properties

Damien André
Administrator
I have no idea. Sorry.