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

Conjugate Heat Transfer in Two-Phase Flow

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

Like Tree6Likes
  • 2 Post By wyldckat
  • 1 Post By Parisa_Khiabani
  • 1 Post By wyldckat
  • 1 Post By liquidspoon
  • 1 Post By liquidspoon

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 28, 2014, 11:31
Default Conjugate Heat Transfer in Two-Phase Flow
  #1
Member
 
Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 13
Parisa_Khiabani is on a distinguished road
Hello everyone,
I a working on evaporation/condensation, using interPhaseChangeFoam.
I could change the solver successfully, and right now I capture the physics. However, at the moment I would like to extend my model to a conjugate heat transfer. I know that I should replace interPhaseChangeFoam solver into chtMultiregionFoam. But, this is not as easy to say.
Would you please guide me how I can make a two-phase flow solver including conjugate heat transfer?

Regards,
Parisa
Parisa_Khiabani is offline   Reply With Quote

Old   September 28, 2014, 12:28
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Parisa,

I'm going to try to give you a quick answer now to guide you in the right direction and hopefully you'll have more news for us during this week.

First of all, practice this tutorial: http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

My strong advice is to not try to modify chtMultiRegionFoam directly, at least not until you've understood how it works.
There is a modified/customized solver which might be useful to get some ideas from: http://www.cfd-online.com/Forums/ope...egionfoam.html - you can compare it to the source code for chtMultiRegionFoam on the variant OpenFOAM 1.6-ext.


After you've gotten a bit more familiar to those two solvers, you should look at the solvers rhoPimpleFoam and buoyantPimpleFoam, which should be the ones with the closest similarities to chtMultiRegionFoam. The point of reference for the core comparison is the code for the "fluid" part of the code on chtMultiRegionFoam.


Then comes the bigger problem: how exactly does interPhaseChangeFoam compare to rhoPimpleFoam and/or buoyantPimpleFoam?
It's possible that you might need to take a smaller step in between, for example, adapting compressibleInterFoam and/or compressibleMultiphaseInterFoam to the fluid section of chtMultiRegionFoam.

Good luck! Best regards,
Bruno
sharonyue and arvindpj like this.
__________________
wyldckat is offline   Reply With Quote

Old   October 5, 2014, 13:40
Default Source term in Energy Equation of interphaseChangeFoam
  #3
Member
 
Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 13
Parisa_Khiabani is on a distinguished road
Hi everyone,
I have a question in adding source term in energy equation due to evaporation/condensation.
I am using interPhaseChangeFoam.
I add the surce term as mdot*hl, that mdot is the net evaporation/condensation rate, and hl is the latent heat.

However, I am wondering whether or not this source is only added on the interface of liquid-vapor. Since the mass must be transferred only at the interface. I think by adding simply the source term, it will be considered for the whole domain, not only on the interface.

Please correct me if I am wrong.

Regards,
Parisa
Kummi likes this.

Last edited by Parisa_Khiabani; October 7, 2014 at 16:35. Reason: Update about Heat Source at the Interface
Parisa_Khiabani is offline   Reply With Quote

Old   October 11, 2014, 11:04
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Parisa,

I've moved your post above from the "OpenFOAM Running, Solving & CFD" sub-forum, so that this can be discussed in a single topic. In addition, I hope you don't mind that I quote a part of what you sent me via PM:
Quote:
Originally Posted by Parisa_Khiabani
At the moment, I am adding the heat source to the implemented energy equation in interPhaseChangeFoam.
This heat source comes from evaporation/condensation multiply by latent heat.
However, I have a hard time to add this term into energy equation. I tried more than 10 different ways, all of them were unsuccessful.
I know that you also add this term to one of your code that sent me earlier.
I really appreciate if you help me how to add this term to energy equation. I also checked alphaEqn.H and pEqn.H, but I couldn't call mdot.
The same question was also asked here:
http://www.cfd-online.com/Forums/ope...se-solver.html

but nobody answered.
You're starting with the correct step, namely to first add temperature to the energy equation in the solver interPhaseChangeFoam. Knowing which were the exact 10 ways you've tried would possibly make it easier to diagnose the problem.


I suggest following these steps:
  1. Create a simple test case, for diagnosing if the solver is working properly. A cube half-filled with water comes to mind. Have this case working properly with interFoam, by which I mean you should also study this thread: http://www.cfd-online.com/Forums/ope...ity-field.html
  2. Now, test this simple case with the solver compressibleInterFoam. This solver has the ability to transport heat... actually, transport temperature between phases, since it must be able to handle compressibility on both phases.
  3. The objective is to test the limitations of this solver compressibleInterFoam. In other words, to diagnose how far you can increase the temperature of the bottom boundary and still get accurate results.
    1. The limitation should be near 100 degree Celsius, since it's when the phase changes, assuming the top boundary is open and letting the air out and making the pressure stay the same.
    2. But you could also keep the cube closed, to assess how much the air will compress with the heating on the bottom boundary.
    3. Or you could do the opposite, and cool down the water instead, to see how much decompression occurs in the air phase.
    4. Extracting air from the cube is also a possibility, so to diagnose the temperature changes as the pressure of the air decreases. The objective is to see how it behaves when it reaches the phase change point for a very low pressure level.
  4. With this test case fully diagnosed with this solver, you can now start testing with interPhaseChangeFoam. The objective is to first simulate with this solver, without any temperature changes. You can and should compare the results obtained between this solver and the other solvers, for similar working conditions. Remember that you want to introduce a new feature into this solver which is already present in other solvers, therefore you must validate if this solver is able to work in the same conditions as the other solvers, namely when there isn't any phase change.
  5. Finally, start studying the source code of both solvers: compressibleInterFoam and interPhaseChangeFoam. They are structurally very similar and should be pretty easy to compare the two and start seeing where the pieces fit together.
  6. Whenever possible, test the changes you make in the new solver and check if it's still working correctly for the situations where phase change should not occur and whether the results are nearly identical to the other solver. This way you can gradually validate if things are working as intended.
  7. The simple test case is great because it's pretty simple to even reproduce the experiment yourself in real life or by using the mass-and-transfer analytical solutions for this problem.
From this step forward, if you still need help, please provide the test case or cases you're using, along with the changes you've made to the solver. This makes it easier to accompany the progress of your work and makes it considerably faster to help you.
Otherwise, personally I won't have nearly enough time to help you before late December.

Best regards,
Bruno
Kummi likes this.
__________________
wyldckat is offline   Reply With Quote

Old   October 11, 2014, 12:16
Default
  #5
Member
 
Alex
Join Date: Jun 2011
Posts: 33
Rep Power: 15
liquidspoon is on a distinguished road
Hi Parisa,

I have also been working in thermally driven phase change phenomena, and I'm not sure that the model in interPhaseChangeFoam is really the one to follow. It seems to be geared towards cavitation type phenomena (pressure, not thermally driven), and applies the phase change everywhere, not just on the interface.

For many practical evaporation and condensation problems, the compressibility of the flow is not important (as in compressibleInterFoam) since the total pressure and density of the liquid and vapor phases are pretty much constant. What I mean by this is that the density of a fluid element will not vary significantly (except at the infinitesimal interface). For example, if you have a smooth condensing film on a plate, the liquid and vapor densities will essentially be constants everywhere in the domain, even though the fluid is condensing. A better model is to apply a phase change source term on the interface which effects the phase fraction, energy, and pressure equations (e.g. the volumetric source).

While I don't want to come across as too much of a self promoter, feel free to check out my JHT paper on the problem. If this seems like the right track to help with your problem, please message me. I can share my code, although I should caution that it is currently in the experimental stage, and I don't want to post it publicly just yet.
wyldckat likes this.
liquidspoon is offline   Reply With Quote

Old   October 13, 2014, 08:49
Default
  #6
Member
 
Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 13
Parisa_Khiabani is on a distinguished road
Thanks Bruno and Alex,
I really appreciate your helps.
Would you please have a look at this post?

http://www.cfd-online.com/Forums/ope...hangefoam.html

In the above post, Jibran claimed that "Yes that is correct. Therefore I am using a modified phase change model. By including terms such as "alpha1*(1-alpha1)" in the phase change equations one can ensure that the evaporation and condensation takes place just at the interface."

I don't get exactly what he means.
By the way, in my model in interPhaseChangeFoam, the phase change is thermally driven although it compares the saturation pressure. I'm saying that because saturation pressures in my model are obtained as a function of temperature.

I appreciate if you guide me about those two comments (one from the post and one from the saturation pressure as a function of temperature)

Best,
Parisa
Parisa_Khiabani is offline   Reply With Quote

Old   October 13, 2014, 09:39
Default
  #7
Member
 
Alex
Join Date: Jun 2011
Posts: 33
Rep Power: 15
liquidspoon is on a distinguished road
Hi Parisa,

I cannot be 100% certain what Jibran meant. My instinct is that he might have meant to apply a source term like: pos( 0.9 - alpha1)*pos( alpha1 - 0.1)*SOURCE .

Something along this line looks like it would only apply the phase change on interface cells. This doesn't work out so well in practice. Some examples where it fails:
  • If you have a case of film condensation, and the ICs have a cell layer of all liquid (alpha1 = 1) below a cell layer of all vapor (alpha1 = 0). Here there would be no condensation (although you could try face values/smoothing of alpha1 to implement this approach).
  • This model doesn't allow for condensation directly at a dry wall. (can be tweaked to allow for this)
  • For numerically smeared-out interfaces, this still doesn't satisfy the physical condition that phase change should occur on a thin surface.
  • Additionally (especially for evaporation problems), applying the volumetric generation term on all cells in some alpha1 range would smear out the interface. The volumetric generation of vapor would lead to a high local velocity pointing away from the interface, and counteract the numerical interface compression techniques.
I have considered the saturation pressure-based approaches, but I am not sure how well these will work in practice. The pressure field near the liquid vapor interface can often be unrealistic (due to the approximate continuum surface tension force model). Will this nonphysically prevent evaporation from a small droplet/around a small bubble due to high pressure on the interface?



These are a few challenges that have been driving my own research and code development.
liquidspoon is offline   Reply With Quote

Old   October 13, 2014, 17:41
Default Strange Results in InterPhaseChangeFoam
  #8
Member
 
Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 13
Parisa_Khiabani is on a distinguished road
One thing that is really strange for me:
When the inlet flow is subcooled, I see evaporation.
However, I would like to see condensation but I cannot. I just set the inlet value for alpha as zero, also zero for internal field. Also I set p_grh less than saturation pressure, to make sure that I have vapor. I set the temperature of the walls much less than the inlet flow temperature (100 C less). However, although the pressure is higher than saturation pressure in some times, I don't see condensation. In fact, in all time directories, alpha is zero and intact.
What do you think about this case?
Please note that I set saturation pressure as a function of temperature.


Regards,
Parisa




Quote:
Originally Posted by liquidspoon View Post
Hi Parisa,

I cannot be 100% certain what Jibran meant. My instinct is that he might have meant to apply a source term like: pos( 0.9 - alpha1)*pos( alpha1 - 0.1)*SOURCE .

Something along this line looks like it would only apply the phase change on interface cells. This doesn't work out so well in practice. Some examples where it fails:
  • If you have a case of film condensation, and the ICs have a cell layer of all liquid (alpha1 = 1) below a cell layer of all vapor (alpha1 = 0). Here there would be no condensation (although you could try face values/smoothing of alpha1 to implement this approach).
  • This model doesn't allow for condensation directly at a dry wall. (can be tweaked to allow for this)
  • For numerically smeared-out interfaces, this still doesn't satisfy the physical condition that phase change should occur on a thin surface.
  • Additionally (especially for evaporation problems), applying the volumetric generation term on all cells in some alpha1 range would smear out the interface. The volumetric generation of vapor would lead to a high local velocity pointing away from the interface, and counteract the numerical interface compression techniques.
I have considered the saturation pressure-based approaches, but I am not sure how well these will work in practice. The pressure field near the liquid vapor interface can often be unrealistic (due to the approximate continuum surface tension force model). Will this nonphysically prevent evaporation from a small droplet/around a small bubble due to high pressure on the interface?



These are a few challenges that have been driving my own research and code development.
Parisa_Khiabani is offline   Reply With Quote

Old   October 16, 2014, 06:25
Default
  #9
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
Hello,

Parisa, i am not sure, but you need to check if your evaporation source term is not an expression linked with "alpha". This may block condensation, since alpha in vapour phase is "0".

Alex,
You say that compressibility of the flow is not important, but in a closed tank, with initial thermal condition far from equilibrium, like 90% of liquid phase, but T > 100 @ 1 atm, your total pressure will change. Or i am wrong ?
By the way, is it possible to see your code, as in your paper you use an interesting way to solve evaporation ( interface selection and the pimple like loop for enthalpy) ?

regards,
olivier
olivierG is offline   Reply With Quote

Old   October 16, 2014, 08:43
Default
  #10
Member
 
Alex
Join Date: Jun 2011
Posts: 33
Rep Power: 15
liquidspoon is on a distinguished road
Hi Olivier,

You raise a very good point, and I should have been more specific. The case I was trying to make is that in many thermally driven phase change processes, there can be a tremendous change in fluid volume without a change in the individual phase densities. Some examples could be: boiling/condensation open to the atmosphere, or in a heat exchanger with relatively low frictional resistance.

In your example of a closed pressure vessel, the compressibility of the vapor phase and variation of the saturation temperature with pressure would have to be considered.

I can try to clean up my code a bit to share, and put together a couple example cases. It may take a few days to get around to it. In the meantime, here is a bit of a teaser on the energy model from a more recent version of the code focused on mixture phase change (where T_sat is a function of concentration).

In this block, I use sub-cycling, like what is done for the alpha1 equation in interFoam. The energy equation transports H (enthalpy), but conduction is driven by the temperature field. So I use an artificial diffusion technique to stabilize this and prevent checker-boarding. The enthalpy equation for the mixture (H = f(x, T)) is user-defined at runtime, and I use GNU libmatheval to interpret it. In such general cases the temperature-enthalpy coupling is non-linear, so it is corrected iteratively here (like the PIMPLE pressure-velocity coupling).

Code:
    for
    ( subCycle<volScalarField> ESubCycle(H, nESubCycles); !(++ESubCycle).end(); )
    {

        for (int EEqnCount=0; EEqnCount < nEnergyLoops; EEqnCount++)
        {
            //Form and solve the energy equation
            fvScalarMatrix EEqn
            (
                fvm::ddt(rho, H)
                + fvm::div(rhoPhi, H)
                - fvc::laplacian(kEff, T)
                - ChillaxFac*( fvm::laplacian(alphaEffRho, H) - fvc::laplacian(alphaEffRho, H) )
                + phaseChangeModel->Q_pc()
            );
            EEqn.solve();

            //Now reevaluate T for the updated enthalpy fields
            T = twoPhaseProperties.T_HX()();
         }

        //Update phase change rates:
        phaseChangeModel->correct();
        alpha1Gen_accum += (runTime.deltaT()/totalDeltaT)*phaseChangeModel->alpha1Gen();
        PCV_accum += (runTime.deltaT()/totalDeltaT)*phaseChangeModel->PCV();
    }
olivierG likes this.
liquidspoon is offline   Reply With Quote

Old   October 16, 2014, 09:42
Default
  #11
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
Hello,

So i am waiting for your code clean up and test case.
I am not sure to catch what 's you are doing with your user defined enthalpy equation, is this similar to chris tabulated properties ?
Btw, sub-cycling energy equation look like a good idea to avoid the too common "Maximum number of iterations exceeded" from the thermo Newton iteration.

regards,
olivier
olivierG is offline   Reply With Quote

Old   May 15, 2015, 05:48
Default
  #12
Senior Member
 
Join Date: May 2011
Posts: 231
Rep Power: 16
Kanarya is on a distinguished road
Hi Parisa,

Did you get solver wring and any reasonable results until now?
I am interested in similar problem as yours and I have started t follow the instructions in this thread...I am doing well until now..if you have any suggestions which will speed up the implementation, I will be very grateful!

Thanks in advance!

Kanarya

Quote:
Originally Posted by Parisa_Khiabani View Post
Hello everyone,
I a working on evaporation/condensation, using interPhaseChangeFoam.
I could change the solver successfully, and right now I capture the physics. However, at the moment I would like to extend my model to a conjugate heat transfer. I know that I should replace interPhaseChangeFoam solver into chtMultiregionFoam. But, this is not as easy to say.
Would you please guide me how I can make a two-phase flow solver including conjugate heat transfer?

Regards,
Parisa
Kanarya is offline   Reply With Quote

Old   June 3, 2019, 04:07
Default
  #13
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 352
Rep Power: 11
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Hello everyone,
Sorry for initiating this post again. I am stuck with a problem, where I couldn't able to stop thinking about it.
I have encountered the problem with phase change (adding source term in energy equation due to evaporation/condensation)

Phase Change >> which solver ? >> met a problem I can't solve, please help me with it
I have posted my query already in the above link


Kindly someone look into it please.
Thank you
Kummi is offline   Reply With Quote

Reply

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
Conjugate Heat Transfer: Wall Heat Flux at Coupled Walls? MaxHeat FLUENT 4 September 14, 2017 10:44
Quenching simulation : how to set up a conjugate heat transfer between solid&liquid Rockda FLUENT 24 August 30, 2016 06:33
Heat transfer can't converge in the multiple phase flow kiwishall CFX 7 March 26, 2014 22:18
Multiphase flow and conjugate heat transfer simulation awacs OpenFOAM Running, Solving & CFD 8 March 1, 2013 05:25
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 15:55


All times are GMT -4. The time now is 14:32.