|
[Sponsors] |
icoUncoupledKinematicParcel particle diameter change each time step (evaporation) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 3, 2021, 01:36 |
icoUncoupledKinematicParcel particle diameter change each time step (evaporation)
|
#1 |
New Member
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 6 |
Hello, Foamers
I'm using icoUncoupledKinematicParcelFoam for agriculture spray evaluation. I need to have a simple age dependant liquid evaporation (basically diameter (mass) change over the age of the particle). Can anyone suggest a solution? I know that there is liquidEvaporationBoil function that can be used with sprayFoam that is compressible. With my velocities (10 m/s air and 10 m/s water) I won't have any compressibility Any advice would be appreciated I'm using openFoam for a long time but I'm not familial with coding in C++ Thank you Regards IC01 |
|
January 4, 2021, 04:55 |
|
#2 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16 |
Hi,
unfortunately, I think there is no way to achieve this using kinematicCloud without any programming. On the other hand it is not that much of programming - one simple line should do the trick. But you would have to recompile the updated lagrangian/intermediate-library and a new solver including that library. Another solution would be to use sprayCloud- (as you mentioned) or reactingCloud-solvers. Droplets can evaporate there. But that would imply to include lots of other things you might not be interested in like compressibility, thermodynamics, phase fractions, ... which makes the whole setup a lot more complex. |
|
January 5, 2021, 01:27 |
|
#3 | |
New Member
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 6 |
Quote:
Hi, Oswald Thank you for your reply I can compile intermediate lagrangian solver but stuck on the part where I have to add the line of the code. By chance, do you know what file I should edit and what line of code should I add? I assume it should be either liquidEvaporationBoil function or something like d(age)=custom function Thanks again for your reply Regards IC01 |
||
January 5, 2021, 14:34 |
|
#4 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16 |
A very simple but also very crude method would be to directly put this in KinematicParcel.C. You could insert something after p.age()...:
Code:
p.age() += dt; // in my code this is at line 350 p.d() = INSERT FUNCTION HERE; |
|
January 6, 2021, 03:27 |
|
#5 | |
New Member
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 6 |
Quote:
Regards IC01 |
||
January 14, 2021, 01:48 |
|
#6 |
New Member
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 6 |
Hello, everyone
Someone might have the same problem as this question appeared on this forum before but no one solved the problem Problem: I need the spray evaporation over the time i.e change of diameter over the time in kinematic largangian openfoam solver Here are the steps that I've done to solve it: 1) Comply your own lagrangian solver: a) create the folder in openFoam 7 folder (I called it solver) b) Copy icoUncoupledKinematicParcelFoam from applications/solvers/lagrangian to the folder you created c) Copy lagrangian folder from src/ folder. After I deleted all of the files except the intermediate folder but you can keep them d) in the icoUncoupledKinematicParticleFoam folder rename icoUncoupledKinematicParticleFoam.C file (I called it my_icoUncoupledKinematicParticleFoam) e) in icoUncoupledKinematicParticleFoam/Make open files and change the first and third line to your file name (for me was icoUncoupledKinematicParcelFoam.C become my_icoUncoupledKinematicParcelFoam.C) f) Open file option in the icoUncoupledKinematicParticleFoam/Make folder and delete line that includes intermidiate folder g) put the following line to the end of exe_inc -I/opt/openfoam7/solver/lagrangian/icoUncoupledKinematicParcelFoam/lagrangian/intermediate/lnInclude$ copy the following line from the top to the bottom of the file -llagrangianIntermediate You should get something like this Code:
EXE_INC = \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ -I$(LIB_SRC)/transportModels \ -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude \ -I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \ -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I/opt/openfoam7/solver/lagrangian/icoUncoupledKinematicParcelFoam/lagrangian/intermediate/lnInclude$ EXE_LIBS = \ -llagrangian \ -llagrangianTurbulence \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lincompressibleTransportModels \ -lfiniteVolume \ -lregionModels \ -lsurfaceFilmModels \ -ldynamicFvMesh \ -ltopoChangerFvMesh \ -lmeshTools \ -llagrangianIntermediate wmake to clean what you have created wclean Now you should have my_icoUncoupledKinematicParcelFoam as a solver 2) Search for KinematicParcel.C file in your solver folder and add line after line 350 This is my case Code:
p.age() += dt; //p.d()=cbrt(pow(p.d(),3)-dt*1e-10);///added!!!!!!!!!! if (cbrt(p.d()*p.d()*p.d()-1.209e-9*p.d()*dt)>0) { p.d()=cbrt(p.d()*p.d()*p.d()-1.209e-9*p.d()*dt); } else p.d()=1e-10; if (p.active() && p.onFace()) wclean wmake This should be it. I've done it without programming knowledge and with very rudimental ubuntu knowledge so everyone can do it Please let me know if anything is unclear Good Luck IC01 |
|
January 14, 2021, 01:50 |
|
#7 | |
New Member
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 6 |
Quote:
IC01 |
||
Tags |
evaporation of droplet, lagrangian, particle |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
bash script for pseudo-parallel usage of reconstructPar | kwardle | OpenFOAM Post-Processing | 42 | May 8, 2024 00:17 |
Transient simulation not converging | skabilan | OpenFOAM Running, Solving & CFD | 14 | December 17, 2019 00:12 |
Help for the small implementation in turbulence model | shipman | OpenFOAM Programming & Development | 25 | March 19, 2014 11:08 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |