espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Constraint violated by particle


From: Ahmad Reza Motezakker
Subject: Re: Constraint violated by particle
Date: Wed, 28 Oct 2020 20:12:16 +0000

Dear Kai,

Thank you very much for the help. It worked. 

Best Regards,
Ahmad Reza

Sent from my iPhone

> On 28 Oct 2020, at 15:03, Kai Szuttor <kai@icp.uni-stuttgart.de> wrote:
> 
> Hi Ahmad,
> 
> as I have mentioned changing the direction of the normal vectors fixes the 
> issue.
> What you maybe did not do is also changing the sign of the distance. The idea 
> is that
> the product of normal vector *and* distance gives a point on the wall 
> surface. Therefor,
> to have a wall at z = 50 parallel to the x-y plane you would have to use 
> normal=[0,0,-1] 
> and dist=-50.
> 
> Best,
> 
> Kai
> 
>> On Wed, Oct 28, 2020 at 09:32:20AM +0000, Ahmad Reza Motezakker wrote:
>>   ​Dear Kai,
>> 
>>   Attached please find the minimal version. Thank you again.
>> 
>>   Best Regards,
>> 
>>   Ahmad Reza
>> 
>>     ----------------------------------------------------------------------
>> 
>>   From: Kai Szuttor <kai@icp.uni-stuttgart.de>
>>   Sent: Wednesday, October 28, 2020 10:17 AM
>>   To: Ahmad Reza Motezakker
>>   Cc: espressomd-users@nongnu.org List
>>   Subject: Re: Constraint violated by particle
>> 
>>   please attach a minimal not working example reproducing your issue
>> 
>>     Am 28.10.2020 um 09:50 schrieb Ahmad Reza Motezakker <armot@kth.se>:
>> 
>>     
>> 
>>     ​​Dear Kai,
>> 
>>     Before sending my email, I tried to change the directions of the normal
>>     vectors but it gave me the same error. To clarify it, Attached please
>>     find the schematic of the way that i have defined the constraints and LB
>>     boundaries and their normal vectors.
>> 
>>     Thank you very much.
>> 
>>     Best Regards,
>> 
>>     Ahmad Reza
>> 
>>     ----------------------------------------------------------------------
>> 
>>     From: Kai Szuttor <kai@icp.uni-stuttgart.de>
>>     Sent: Wednesday, October 28, 2020 9:28 AM
>>     To: Ahmad Reza Motezakker
>>     Cc: espressomd-users@nongnu.org List
>>     Subject: Re: Constraint violated by particle
>> 
>>     Hi Ahmad,
>>     i guess your normal vectors are pointing in the wrong direction?
>>     Best,
>>     Kai
>> 
>>       Am 28.10.2020 um 09:23 schrieb Ahmad Reza Motezakker <armot@kth.se>:
>> 
>>       
>> 
>>       Dear All, 
>> 
>>       I have a system of a polymer chain, LB fluid and wall constraints (a
>>       small chain of polymer, Two wall for fluid boundary and at the same
>>       place two wall constraints for setting up the wall-particle
>>       interaction). I make the system in the order of creating the polymer
>>       chain, fluid and its LB boundaries (Wall), and constraints. I do not
>>       face any error during polymer warming up, equilibration, and
>>       fluid-polymer warming up. I define the polymer far from the
>>       constraints and add lennard-jones repulsion between the polymer and
>>       constraints to avoid any constraint violation. I define the LB
>>       boundaries and constraints as follows:
>> 
>>       -----------------------------------------------------
>> 
>>       logging.info("Setup LB boundaries.")
>>       top_wall =
>>       
>> espressomd.lbboundaries.LBBoundary(shape=espressomd.shapes.Wall(normal=[0,
>>       0, -1], dist=0))
>>       bottom_wall =
>>       
>> espressomd.lbboundaries.LBBoundary(shape=espressomd.shapes.Wall(normal=[0,
>>       0, 1], dist=50))
>>       system.lbboundaries.add(top_wall)
>>       system.lbboundaries.add(bottom_wall)
>>       #for constraints only
>>       TopWall = Wall(dist=0, normal = (0,0,-1))
>>       BottomWall = Wall(dist = 50, normal=(0,0,1))
>>       system.constraints.add(shape = TopWall, particle_type = 10,
>>       penetrable=False)
>>       system.constraints.add(shape = BottomWall, particle_type = 10,
>>       penetrable=False)
>>       -----------------------------------------------------
>>       But when I run the integration, in the very very first step (while the
>>       polymer is the middle of the box and far from the walls) I face the
>>       error : Constraint violated by particle.
>>       Could you please give me some hints on that? I really appreciate your
>>       help.
>>       ​Best Regards,
>>       Ahmad Reza
>> 
>>     <boundaries.pdf>
> 
> 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]