CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

remove particle

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By nimasam

Reply
 
LinkBack Thread Tools Display Modes
Old   November 14, 2015, 16:44
Default remove particle
  #1
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,211
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
im going to implement a function in icoLagrangianFoam, and i use basicKinematicCloud, i want to delete a particle from specific zone in computational domain. for now i can return access to particle and mark it, but i dont know how to remove it.

deleteParticle or move functions are a part of Cloud class, i can not understand how i can access to Cloud.H from basicKinematicCloud object?
__________________
Telegram channel (https://telegram.me/openfoam4Iranian)
My Weblog (http://openfoam.blogfa.com/)
Training Course on OpenFOAM at (http://www.isme.ir/)
nimasam is offline   Reply With Quote

Old   November 15, 2015, 06:42
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,211
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
i continue this post, it can be achieve with following piece of code:
Quote:
kinematicCloud.deleteParticle(p);
but after it deletes the first particle, it error in second one, the error line is:
Quote:
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam:LListBase::remove(Foam:LListBase::link*) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4
in "/home/nimasam/OpenFOAM/nimasam-2.2.0/platforms/linuxGccDPOpt/bin/icoLagrangianFoam"
#5 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#6
in "/home/nimasam/OpenFOAM/nimasam-2.2.0/platforms/linuxGccDPOpt/bin/icoLagrangianFoam"
Segmentation fault (core dumped)
__________________
Telegram channel (https://telegram.me/openfoam4Iranian)
My Weblog (http://openfoam.blogfa.com/)
Training Course on OpenFOAM at (http://www.isme.ir/)
nimasam is offline   Reply With Quote

Old   November 15, 2015, 14:18
Default
  #3
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,211
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
the problem solved
__________________
Telegram channel (https://telegram.me/openfoam4Iranian)
My Weblog (http://openfoam.blogfa.com/)
Training Course on OpenFOAM at (http://www.isme.ir/)
nimasam is offline   Reply With Quote

Old   September 5, 2016, 07:15
Default delete particle
  #4
New Member
 
sina
Join Date: Jul 2013
Posts: 11
Rep Power: 5
aghsin is on a distinguished road
Quote:
Originally Posted by nimasam View Post
i continue this post, it can be achieve with following piece of code:

but after it deletes the first particle, it error in second one, the error line is:
Hi Nima,
would you please explain how did you managed to solve the problem?
aghsin is offline   Reply With Quote

Old   September 30, 2016, 13:43
Default
  #5
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,211
Blog Entries: 1
Rep Power: 17
nimasam is on a distinguished road
following syntax:
Code:
typedef typename Foam::KinematicParcel<Foam::particle> parcelType ;

forAllIter( basicNewKinematicCloud , kinematicCloud, iter)
{
    parcelType& p = iter(); //paticle
   kinematicCloud.deleteParticle(p);
}
aghsin likes this.
__________________
Telegram channel (https://telegram.me/openfoam4Iranian)
My Weblog (http://openfoam.blogfa.com/)
Training Course on OpenFOAM at (http://www.isme.ir/)
nimasam is offline   Reply With Quote

Reply

Tags
basickinematiccloud, particle

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF for particle interception with pt_termination fortran routine abcdefgh CFX 5 July 27, 2015 04:40
Remove particle in solidParticleFoam shchepan OpenFOAM Programming & Development 8 April 16, 2014 17:29
injection problem Mark New FLUENT 0 August 4, 2013 01:30
forced to sticking of soot particle kmgraju CFX 0 November 27, 2012 10:08
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01:29


All times are GMT -4. The time now is 14:35.