|
[Sponsors] |
dieselFoam: Summation of total droplet momentum in a Cell |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 17, 2010, 22:11 |
dieselFoam: Summation of total droplet momentum in a Cell
|
#1 |
Member
N. A.
Join Date: May 2010
Posts: 64
Rep Power: 16 |
Hello,
Can someone share their experience on how can total momentum of droplets in a cell be calculated and stored in a a variable. I am new to C++ language and I really need someone's experience in creating a new variables in dieselFoam. Thanks, Nir |
|
July 18, 2010, 00:15 |
|
#2 | |
Senior Member
|
Quote:
volVectorField moment ( IOobject ( "moment", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, dimensionedVector("moment", dimensionSet(1, -2, -2, 0, 0),vector::zero) ); spray::iterator mol(dieselSpray.begin()); for (mol = dieselSpray.begin(); mol != dieselSpray.end(); ++mol) { label cellI=mol().cell(); moment[cellI]+=mol().m()*mol().U(); } Junwei |
||
July 18, 2010, 00:52 |
|
#3 |
Member
N. A.
Join Date: May 2010
Posts: 64
Rep Power: 16 |
Hi Junwei,
Thanks. Is this addition to be made in dieselFoam.C of the solver dieselFoam or should be added in one of the files in the ../src/dieselSpray.. directory. Thanks, Nir |
|
July 18, 2010, 05:21 |
|
#4 |
Senior Member
|
||
August 26, 2010, 13:58 |
|
#5 |
Member
N. A.
Join Date: May 2010
Posts: 64
Rep Power: 16 |
Hi Junwei,
I wish to add a variable in the lagrangian equations and solve for it. Just as we solve for x,d, m, T, etc for particle properties, I am trying to solve for distorted surface area for each particle and wish to calculate each time-step. Do you know how another variable be added into lagrangian variables and solve for it. Any ifnormation will be very helpful. Thanks, Nir |
|
August 26, 2010, 22:37 |
|
#6 |
Senior Member
|
Hi Nir
You can add a variable into parcel class in /src/lagrangian/dieselSpray/parcel/ 1) add variable 2) add read and write access function to this variable 3) add IO operation in parcelIO.C You can alter the variable like the following code cloudObject is the particle cloud. yourVariable is your variable name you defined. for ( spray::iterator particle = cloudObject.begin(); particle != cloudObject.end(); ++particle ) { particle().yourVariable()=.... // do as you like. } Regards, Junwei |
|
September 14, 2010, 10:37 |
|
#7 |
New Member
Palma González García
Join Date: May 2009
Location: Valencia, Spain
Posts: 8
Rep Power: 17 |
What a nice topic!
Last edited by Palminchi; September 20, 2010 at 08:48. |
|
September 20, 2010, 08:43 |
|
#8 |
New Member
Palma González García
Join Date: May 2009
Location: Valencia, Spain
Posts: 8
Rep Power: 17 |
Dear su_junwei,
As far as I understand, if you are multiplying m()*U(), the dimmension of the vector when you defined it before should be (1 1 -1), shouldn't it? Please, confirm if this is something I don't understand or something I can't see when you make the iterator programming. And other question is, with the iterator, could I obtain the momentum flux of the droplets(which is m*U^2) ? And do you know how I could obtain the gas momentum? Best regards and thank you very much, Palma. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FvMatrix coefficients | shrina | OpenFOAM Running, Solving & CFD | 10 | October 3, 2013 15:38 |
Cells with t below lower limit | Purushothama | Siemens | 2 | May 31, 2010 22:58 |
Derivation of Momentum Equation in Integral Form | Demonwolf | Main CFD Forum | 2 | October 29, 2009 20:53 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 05:15 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 05:41 |