|
[Sponsors] |
Regarding modified drag force formulation for application in dense flows |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 17, 2014, 10:19 |
Regarding modified drag force formulation for application in dense flows
|
#1 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Hey everybody!!
I am new to openfoam and I have been having a lot of difficulty in trying to understand and implement the drag formulation. I am trying to simulate a system of particles (dense packing, vol fraction 0.85) in a box. This simulation is an extension of the hopper tutorial (icoUncoupledKinematicParcelFoam). For a given system, particle gravity is constant but gas drag changes dramatically (in a strong non-linear way) with the local particle number density. The presence of other particles restricts fluid space, creates a sharp velocity gradient in the surrounding gas phase and, as a result, yields increased shear stress acting on the particle surface. This is the effect i want to quantify. There are several relations in literature to account for expressing drag in the presence of other particles. i would like to implement one/several of these. I am having a hard time trying to figure out in which file/s are the expression for drag force being estimated (I have examined the file Spheredragforce.C in the location ~./src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag). But this file only provides the expression for the drag coe-eff Cd, what i want is the expression for the drag force Fdrag, which I am unable to locate. Could anyone help me in identifying this source file?? Regards ansubru |
|
February 22, 2014, 13:22 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi ansubru,
As promised via private message, I've taken a better look into this. I've taken a quick look at the source code and I think that the first step is to determine at what point do you need to perform this calculation. I ask this, because from your description, what you seem to want to do is a post-processing feature, not something that is done for the solution of the simulation itself. Best regards, Bruno
__________________
|
|
February 22, 2014, 13:30 |
|
#3 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Hi!!
Thank you for looking into this!! I am looking at this change more at the "source".. as in.. I would like to change the way drag is calculated by including a volume fraction function (f(epsilon)). This would mean that the drag calculation at every time step must include this function. Does this help??? |
|
March 4, 2014, 13:12 |
|
#4 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi ansubru,
I've finally managed to give a better look into this. If you have a look into the classes defined in the folder "src/lagrangian/intermediate/submodels/Kinematic/ParticleForces", there is an interesting pattern:
It's in the class "KinematicParcel", method "calcVelocity", located in the folder "src/lagrangian/intermediate/parcels/Templates/KinematicParcel/". It relies on the class "TrackData::cloudType::forceType", where "TrackData" is a template name... OK, I got lost here, because this section is deeply based in templates, which is a considerable pain to figure out who-is-what-and-where-and-how But the point is that this line: Code:
const forceSuSp Fcp = forces.calcCoupled(p, dt, mass, Re, mu); And the rest... is up to you! Best regards, Bruno
__________________
|
||
March 14, 2014, 03:53 |
|
#5 |
Member
Sören Sander
Join Date: Sep 2012
Location: Germany
Posts: 43
Rep Power: 14 |
Hi ansu, Bruno,
I am also investigating this solver. I still have many remaining questions, but maybe the follwing gives you a starting point: A. For information on template for class Trackdata look into /intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C. B. If you want to include a new force to the solver, you may try the following (which I haven't tried yet):
I might find some time at the weekend to implement a new force and check if the works. I will keep you updated. Best regards Sören |
|
March 14, 2014, 07:09 |
|
#6 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Hi Soren!!
Thank you so much for that update. Your views have indeed helped me. I have compiled my own user libraries and am modifying the source code there. That idea was really a very profitable one. In addition to that, I have encountered another huge error during my computation. I have started a thread about the same, could you give me your impressions about these?? The thread in question is -- http://www.cfd-online.com/Forums/ope...quent-run.html Best regards ansubru |
|
March 17, 2014, 04:03 |
|
#7 |
Member
Sören Sander
Join Date: Sep 2012
Location: Germany
Posts: 43
Rep Power: 14 |
I implemented a new force during the weekend and it seems to work without bigger problems. The only thing, which I could not figure out, is how additional fields of the carrier phase are implemented to the library (e.g. the volVectorField U). Any hints on this?
All I found was Code:
template <class ParcelType> inline const Foam::vector& Foam::KinematicParcel<ParcelType>::Uc() const { return Uc_; } |
|
July 7, 2014, 08:38 |
|
#8 |
Senior Member
|
Hi Soren and Ananda,
I am trying to implement a new drag model as well. Can you explain better which steps must I do after I compiled the new library?? I try to explain myself better. After I copied the Myintermediate lib in my user library folder, how can I link this one with the solver myIcoUncoupledKinematicParcelFoam. What must I change in the file Make/option of the solver? Thanks in advance for the answer Regards Marco |
|
July 7, 2014, 16:08 |
|
#9 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Marco: It really depends on what exactly you're trying to achieve, and knowing which OpenFOAM version you're using would also help . Using OpenFOAM 2.3 as a reference: having a new library "lagrangianIntermediate" means that you'll need to replace in "Make/options" the following lines:
So, my suggestion is that:
Bruno
__________________
|
|
July 8, 2014, 02:55 |
|
#10 |
Senior Member
|
Hi Bruno,
I thank you for the answer. The OpenFoam version is 2.3.0. I try to follow your suggestions. Anyway, I would you like to recompile the whole library because I want to compute as well the volume fraction of the lagrangian phase. Regarding this, do you have some suggestion on in which part of the code is available the number of particles, their diameter and the mesh volume? So which part of the code I need to modify or at least have look? Thanks in advance Best Regards Marco |
|
July 8, 2014, 04:36 |
|
#11 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Hi Guys!!
I have compiled my own dynamic linked library from scratch.. Most of the steps needed are available in previous posts, just as Bruno suggested ... Isnt the volume fraction of the carrier phase already computed (look at alpha.air)?? Maybe that can help?? Anyways, I had some questions for all you guys.. I want to modify the DPMFoam solver so that it can handle dynamic mesh computations (I need to introduce a moving wall at one of the boundaries and from most of the tutorials pimpleDyMFoam test tube mixer vessel) .I have deduced that the best way to go about this is by using a 'DyM' approach.. My questions are as follows - 1) Can the DPMFoam solver handle 'DyM* cases.. I guess this is possible as the DPMFoam solver is nothing but a combination of pimpleFoam and icoUncoupledKinematicFoam ( both of these solvers have DyM capability) 2) How could I go about with this.. As of now I am trying to adapt the DPMFoam code pimple velocity loop to the corresponding loop from pimpleDyMFoam (i.e. replaced the loop in the original solver with this one.. ) Is this the correct way forward..?? Can somebody help me with this?? I will paste the DPMDymFoam solver script here and highlight the bits I have altered, Code:
Application DPMDyMFoam Description Transient solver (incorporating moving meshes) for the coupled transport of a single kinematic particle cloud including the effect of the volume fraction of particles on the continuous phase. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "dynamicFvMesh.H" #include "singlePhaseTransportModel.H" #include "PhaseIncompressibleTurbulenceModel.H" #include "pimpleControl.H" #include "fixedFluxPressureFvPatchScalarField.H" #include "fvIOoptionList.H" #ifdef MPPIC #include "basicKinematicMPPICCloud.H" #define basicKinematicTypeCloud basicKinematicMPPICCloud #else #include "basicKinematicCollidingCloud.H" #define basicKinematicTypeCloud basicKinematicCollidingCloud #endif int main(int argc, char *argv[]) { argList::addOption ( "cloudName", "name", "specify alternative cloud name. default is 'kinematicCloud'" ); #include "setRootCase.H" #include "createTime.H" #include "createDynamicFvMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createUf.H" #include "createFvOptions.H" #include "initContinuityErrs.H" pimpleControl pimple(mesh); Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { #include "readControls.H" #include "CourantNo.H" #include "setDeltaT.H" #include "createPcorrTypes.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; mesh.update(); // Calculate absolute flux from the mapped surface velocity phi = mesh.Sf() & Uf; if (mesh.changing() && correctPhi) { #include "correctPhi.H" } // Make the flux relative to the mesh motion fvc::makeRelative(phi, U); if (mesh.changing() && checkMeshCourantNo) { #include "meshCourantNo.H" } U.correctBoundaryConditions(); continuousPhaseTransport.correct(); muc = rhoc*continuousPhaseTransport.nu(); Info<< "Evolving " << kinematicCloud.name() << endl; kinematicCloud.evolve(); // Update continuous phase volume fraction field alphac = max(1.0 - kinematicCloud.theta(), alphacMin); alphac.correctBoundaryConditions(); alphacf = fvc::interpolate(alphac); alphaPhic = alphacf*phic; fvVectorMatrix cloudSU(kinematicCloud.SU(Uc)); volVectorField cloudVolSUSu ( IOobject ( "cloudVolSUSu", runTime.timeName(), mesh ), mesh, dimensionedVector ( "0", cloudSU.dimensions()/dimVolume, vector::zero ), zeroGradientFvPatchVectorField::typeName ); cloudVolSUSu.internalField() = -cloudSU.source()/mesh.V(); cloudVolSUSu.correctBoundaryConditions(); cloudSU.source() = vector::zero; // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { #include "UcEqn.H" // --- PISO loop while (pimple.correct()) { #include "pEqn.H" } if (pimple.turbCorr()) { continuousPhaseTurbulence->correct(); } } runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; return 0; } // ************************************************************************* // Could anyone go through and tell me if this methodology is correct?? Moreover I get the following errors during compilation of this solver - Code:
In file included from /home/ask/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude/fvOptionList.H:41:0, from /home/ask/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude/fvIOoptionList.H:38, from DPMDyMFoam_mod.C:40: /home/ask/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude/fvOption.H:53:24: fatal error: meshToMesh.H: No such file or directory compilation terminated. make: *** [Make/linux64GccDPDebug/DPMDyMFoam_mod.o] Error 1 Thanks guys Regards ansubru |
|
July 8, 2014, 05:23 |
|
#12 |
Member
Ananda Kannan
Join Date: Feb 2014
Location: Göteborg, Sweden
Posts: 55
Rep Power: 12 |
Hi Again Guys!!
I tried to remove some of of the redundant headers in the above code and now i get this error while compilation - Code:
In file included from DPMDyMFoam_mod.C:65:0: /home/ask/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/createUf.H: In function ‘int main(int, char**)’: /home/ask/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/createUf.H:49:22: error: ‘U’ was not declared in this scope /home/ask/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/createUf.H:54:14: error: ‘phi’ was not declared in this scope In file included from DPMDyMFoam_mod.C:66:0: /home/ask/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude/createFvOptions.H:1:1: error: ‘IOoptionList’ is not a member of ‘Foam::fv’ /home/ask/OpenFOAM/OpenFOAM-2.3.0/src/fvOptions/lnInclude/createFvOptions.H:1:18: error: expected ‘;’ before ‘fvOptions’ DPMDyMFoam_mod.C:87:9: error: ‘phi’ was not declared in this scope make: *** [Make/linux64GccDPDebug/DPMDyMFoam_mod.o] Error 1 Thanks again Regards ansubru |
|
September 13, 2014, 16:51 |
|
#13 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
And sorry for the reaaaaally late reply, but I'm still catching up on threads I wasn't able to answer since July. @Marco: Quote:
------------------ @ansubru: I've searched for other posts you've made since the post above and I believe you've gotten an answer in this post: http://www.cfd-online.com/Forums/ope...tml#post501356 post #3 ? Best regards, Bruno |
||
September 14, 2014, 04:57 |
|
#14 | |
Senior Member
|
Hi Bruno,
@Bruno Quote:
I am using uncoupledKinematicParcelFoam. There is just a deterministic collision model and I tryed to implement (copy) there a sthocastic collision model, which accounts as well for the coalescence of the particles. I copied the O'Rourke collision model and when i tryed to compile it I got some error messages due the lack of the reaction and thermo partin uncoupledKinematicParcelFoam. Dou you know how I can implement and compile a sthocastic collision model with coalescence for uncoupledKinematicParcelFoam? Best Regards Marco Longhitano |
||
September 14, 2014, 09:08 |
|
#15 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Marco,
OK, I did a quick search and based myself on some stuff I already know from my studies for this thread: http://www.cfd-online.com/Forums/ope...mppicfoam.html In other words, I'm not an expert on this topic, I only know some bits and pieces, which hopefully can guide you in the right direction. Quote:
Quote:
Nonetheless, if I can understand you correctly, you want to add features to a collision model. First a quick overview:
Code:
src/lagrangian/intermediate/clouds/baseClasses/ src/lagrangian/intermediate/clouds/derived/ src/lagrangian/intermediate/clouds/Templates/ Code:
basicKinematicCloud kinematicCloud ( kinematicCloudName, rho, U, thermo.mu(), g ); Beyond this, I'm all out of ideas, at least for now. Best regards, Bruno
__________________
|
|||
September 14, 2014, 10:04 |
|
#16 |
Senior Member
|
Hi Bruno,
I thank you for the answer. Your suggestions will be really helpful. I will go ahead with my implementation and let the thread update. I would like also to ask to you an opinion about another post that I recently opened. Here is the link: http://www.cfd-online.com/Forums/ope...tml#post510287 When/If you have time please have a look. Thanks Regards Marco |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Relaltionship between pressure drop and drag force | Li | Main CFD Forum | 5 | March 4, 2017 17:04 |
CoL, Lift force, CoD, Drag Force | Echidna | CFX | 3 | June 18, 2010 06:59 |
Drag force computation | Martin | Main CFD Forum | 9 | July 11, 2008 10:10 |
Drag formulation | remy | Main CFD Forum | 0 | March 10, 2002 14:05 |
Airfoil Drag Force | wowakai | Main CFD Forum | 3 | October 13, 1998 20:27 |