CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   sprayFoam water spraying into steam-air environment (https://www.cfd-online.com/Forums/openfoam-programming-development/131448-sprayfoam-water-spraying-into-steam-air-environment.html)

wolfindark March 14, 2014 23:11

sprayFoam water spraying into steam-air environment
 
Dear All

I appreciate your valuable discussions here.

I would like to model a sub-cooled water spray injected to steam-air mixture container.
Container atmosphere temperature is higher than the 100 C.

My first impression is using sprayFoam. Droplet evaporation is already a built-in functionality, however, here I want steam condensation onto droplets. an inverse phase change.

any brainstorming or anyone who solved this problem? or another solver is better ? (may be)...

wolfindark March 17, 2014 04:12

My first idea is using sprayFoam. and implement a condensation model modifying liquidevaporation submodel. I modified it as a test case and compile it as dynamic library.

I have a problem with the compilation I think because solver does not recognize my new submodel.

I can see my created library under my home directory (/home/neo/OpenFOAM/neo-2.1.1/platforms/linux64GccDPOpt/lib)

Although I added this library into controlDict as libs("myPhasechange").

any idea?

thanks

mturcios777 March 17, 2014 12:15

In your controlDict, try "libmyPhaseChange.so".

wolfindark March 18, 2014 00:30

It still gives this error :(

Code:

--> FOAM FATAL ERROR:
Unknown phase change model type myliquidEvaporation

Valid phase change model types are:

3
(
liquidEvaporation
liquidEvaporationBoil
none
)


    From function PhaseChangeModel<CloudType>::New(const dictionary&, CloudType&)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.1/src/lagrangian/intermediate/lnInclude/PhaseChangeModelNew.C at line 54.

FOAM exiting


dkxls March 18, 2014 03:04

Quote:

Originally Posted by wolfindark (Post 480580)
It still gives this error :(

Can you post your code? Specifically, how do you compile the model?

Your approach is the right one and I do it for various sub models (Breakup, Injection, ...). I actually already did it for the evaporation model when this stuff was broken in OF (version 2.2.2 and earlier, a recent 2.2.x works fine).

dkxls March 18, 2014 03:08

Quote:

Originally Posted by wolfindark (Post 480580)
Code:

    in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.1/src/lagrangian/intermediate/lnInclude/PhaseChangeModelNew.C at line 54.

Just saw, you are using 2.1.1.

You should switch to 2.2.x or newer!

I haven't tested 2.3.x, but a quick review of the changes in the Lagrangian libraries, let's me assume that it should work equally well.

wolfindark March 18, 2014 03:25

I use OF 2.1.1.

I copied the /opt/openfoam211/src/lagrangian/intermediate/ directory to may case directory.

under this directory intermediate/submodels/Reacting/PhaseChangeModel/myLiquidEvaporation/
I created myLiquidEvaporation.H and myLiquidEvaporation.C

I added following lines for the new model into makeReactingParcelPhaseChangeModels.H which is under the directory intermediate/parcels/include/
Code:

#include "myLiquidEvaporation "
makePhaseChangeModelType(myLiquidEvaporation, CloudType);

and wclean, wmake libso under the intermediate/ directory


Please download whole case from following link. since It is 2.7Mb I could not attache it to here.

https://dl.dropboxusercontent.com/u/...spray_test.zip

Note that; I use different gas compositions at different level as initial gas composition. initfield3D do this.

thank you

wolfindark March 18, 2014 03:28

Could you please check my compiling method? is it Okay?

I will change to OF 2.2.x

dkxls March 18, 2014 10:21

1 Attachment(s)
Quote:

Originally Posted by wolfindark (Post 480605)
Could you please check my compiling method? is it Okay?

Nope, doesn't work like that.
As I said, you are on the right track, but you just should compile your phaseChangeModel not the entire intermediate library. That causes a lot of problems because the solvers are linked against the OF intermediate library. Now, changing the linking would be possible, I have also done that already ;) but you don't really want to do that, it's just trouble.

I attached an archive with some code that does the trick. The model is just a copy of the original LiquidEvaporationBoil, so you still have to do your own changes. ;)

Don't forget to change your controlDict accordingly.

-Armin

wolfindark March 19, 2014 01:48

Thank you Armin,

I will try it. But as you said definitely there is a problem with 2.1.1.

Do you have any experience on modelling steam condensation on sprayed water droplets ?

wolfindark August 17, 2016 00:53

Long time passed.
This time I want to change the heat transfer model. I want to include gas concentrations in the Nusselt number calculations. As you know RanzMarshall model can be modified, I have to also modify the HeatTransferModel.C and .H ...

I appreciate any idea.

RobinZ November 4, 2016 09:21

Did you make your steam condensation solver to work?

I want to solve the same problem and i'm not sure if there is already an openfoam solver to manage a two phase flow phase change, like steam condensation in air.

best regards

Robin


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