|
[Sponsors] |
February 5, 2015, 11:39 |
Count breakup events per cell
|
#1 |
Member
Andreas Weber
Join Date: Jun 2014
Posts: 37
Rep Power: 12 |
Hello everyone,
I'm currently working on some changes on the sprayFoam solver to do different breakup and coalescence models. It would be great to visualize areas of higher breakup/coalescence frequency. Therefore I create scalarfields (e.g. n_bu for breakup and n_coal) just as a counter for each cell. If breakup occurs in a cell, the value should just count up. Later on I could calculate the breakup freqeuncy easily with this field. Breakup is mainly defined in ...../src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C What do I have to add there, to get my counter working? Since SprayParcel.C is meant to only treat the particles fields, there is no direct access to the mesh fields (in some way read-only through interpolation of velocity Uc_ = td.UInterp().interpolate(....); ) The Idea is really easy, but I was not able to find a solution yet. Best regards, Andy |
|
February 5, 2015, 12:47 |
|
#2 | ||
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
Quote:
Well, actually both could be quite interesting. There is a unused "user" variable in the SprayParcel class. You could use that as a counter. The problem here is just that you determine the breakup event inside the BreakupModel classes, which don't have access to the "user" variable, or the mesh for that matter. I'm not sure if it works, but you could try to pass the user variable to: Code:
bool Foam::BreakupModel<CloudType>::update Quote:
Once you have access to your fields you can also pass them to the breakup models and get your counter per cell. I just saw that you have access to the cell number and TrackData already inside the void Foam::SprayParcel<ParcelType>::calcBreakup function. You should get access to the mesh like this (haven't tested it though): Code:
const polyMesh& mesh = td.cloud().pMesh(); Last edited by dkxls; February 5, 2015 at 13:01. Reason: add info on mesh access |
|||
February 9, 2015, 08:29 |
|
#3 | |
Member
Andreas Weber
Join Date: Jun 2014
Posts: 37
Rep Power: 12 |
Quote:
|
||
February 10, 2015, 08:43 |
|
#4 | |
Member
Andreas Weber
Join Date: Jun 2014
Posts: 37
Rep Power: 12 |
Thank you for the quick reply!
I'm trying to define n_bu trough an IOobject, somehow like this: Quote:
So I think what I have to do is to pass the fvMesh down to SprayParcel.C (e.g. from KinematicCloud.C). Or is there a easier/faster solution to obtain the fvMesh??? |
||
April 29, 2015, 05:56 |
|
#5 |
Member
Andreas Weber
Join Date: Jun 2014
Posts: 37
Rep Power: 12 |
Still haven't found a solution yet.
You're right so far, i can make use of td.cloud().pMesh(); in Foam::SprayParcel<ParcelType>::calcBreakup but so far I have only managed to get read-only access to the field values (e.g. to my counter-field "n_bu" with lookupObject<volScalarField>("n_bu")). So is there a way to get write access somehow to that field, probably with a Pointer? |
|
Tags |
breakup model, coalescence, counter, particle |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cell Reynolds Number | laliong | Main CFD Forum | 12 | September 17, 2019 04:18 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 15:06 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |
monitoring cell | Jane | Siemens | 2 | March 4, 2004 22:01 |
cell to cell relation | CMB | Siemens | 1 | December 4, 2003 05:05 |