|
[Sponsors] |
How to modify the particle patchInjection model to a position injection model? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 20, 2018, 07:55 |
How to modify the particle patchInjection model to a position injection model?
|
#1 |
New Member
Matthew
Join Date: Aug 2017
Posts: 28
Rep Power: 9 |
Sorry that I am pretty new about the C++ code in OpenFOAM. I am currently trying to simulate a particle-laden flow with the lagrangian particles injecting into the domain from a section at a certain position. The geometry of the section is as same as the inject patch, but it is 100mm away from the inject patch in the downstream domain (shown in the figure). Can it be achieved by simply modifying the codes related to “position” as below in the "patchInjection.C" file? If it is achievable, how to modify them?
Code:
if ((time0 >= 0.0) && (time0 < duration_)) { scalar nParcels = (time1 - time0)*parcelsPerSecond_; cachedRandom& rnd = this->owner().rndGen(); label nParcelsToInject = floor(nParcels); // Inject an additional parcel with a probability based on the // remainder after the floor function if ( nParcelsToInject > 0 && ( nParcels - scalar(nParcelsToInject) > rnd.globalPosition(scalar(0), scalar(1)) ) ) { ++nParcelsToInject; } return nParcelsToInject; } else { return 0; } Thank in advance and kind regards. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Particle Tracking (DPM Model) | kaveh0a | FLUENT | 2 | July 5, 2018 02:25 |
How to simulate the eulerian multiphase model about particle | jhlee9622 | STAR-CCM+ | 2 | November 24, 2016 12:37 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
problem with solving lagrange reaction cloud | Polli | OpenFOAM Running, Solving & CFD | 0 | April 30, 2014 08:53 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |