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

remove particle

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By nimasam

Reply
 
LinkBack Thread Tools Search this Thread 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,267
Blog Entries: 1
Rep Power: 25
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?
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
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,267
Blog Entries: 1
Rep Power: 25
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)
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
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,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
the problem solved
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   September 5, 2016, 08:15
Default delete particle
  #4
New Member
 
sina
Join Date: Jul 2013
Posts: 21
Rep Power: 13
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, 14:43
Default
  #5
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
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.
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   March 27, 2020, 22:10
Default
  #6
ywj
New Member
 
Wenjie Yang
Join Date: Jul 2019
Posts: 2
Rep Power: 0
ywj is on a distinguished road
hi, could you please tell me where you write those codes?
ywj is offline   Reply With Quote

Old   March 28, 2020, 20:41
Default
  #7
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
you can add it to your Lagrangian solver and recompile the solver
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Reply

Tags
basickinematiccloud, particle


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 Off
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 6 October 6, 2019 14:30
Remove particle in solidParticleFoam shchepan OpenFOAM Programming & Development 8 April 16, 2014 18:29
injection problem Mark New FLUENT 0 August 4, 2013 02: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 02:29


All times are GMT -4. The time now is 18:01.