CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

icoUncoupledKinematicParcel particle diameter change each time step (evaporation)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By IC01

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2021, 00:36
Default icoUncoupledKinematicParcel particle diameter change each time step (evaporation)
  #1
New Member
 
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 2
IC01 is on a distinguished road
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
IC01 is offline   Reply With Quote

Old   January 4, 2021, 03:55
Default
  #2
Member
 
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 73
Rep Power: 12
oswald is on a distinguished road
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.
oswald is offline   Reply With Quote

Old   January 5, 2021, 00:27
Default
  #3
New Member
 
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 2
IC01 is on a distinguished road
Quote:
Originally Posted by oswald View Post
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.

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
IC01 is offline   Reply With Quote

Old   January 5, 2021, 13:34
Default
  #4
Member
 
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 73
Rep Power: 12
oswald is on a distinguished road
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;
oswald is offline   Reply With Quote

Old   January 6, 2021, 02:27
Default
  #5
New Member
 
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 2
IC01 is on a distinguished road
Quote:
Originally Posted by oswald View Post
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;
Simple but works. You are a life saver. I will publish the steps once I finish it, might be good advice for someone like myself

Regards
IC01
IC01 is offline   Reply With Quote

Old   January 14, 2021, 00:48
Default
  #6
New Member
 
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 2
IC01 is on a distinguished road
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
h) open terminal in icoUncoupledKinematicParcelFoam
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())
after comply the solver
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
IC01 is offline   Reply With Quote

Old   January 14, 2021, 00:50
Default
  #7
New Member
 
Illia
Join Date: Aug 2020
Posts: 10
Rep Power: 2
IC01 is on a distinguished road
Quote:
Originally Posted by oswald View Post
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;
And Huge thanks to Oswald for the support

IC01
oswald likes this.
IC01 is offline   Reply With Quote

Reply

Tags
evaporation of droplet, lagrangian, particle

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script for pseudo-parallel usage of reconstructPar kwardle OpenFOAM Post-Processing 39 July 1, 2020 09:13
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 16, 2019 23:12
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 10:08
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03


All times are GMT -4. The time now is 13:50.