CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   A difficult challenge... (

e_boesso July 5, 2012 12:07

A difficult challenge...

I'm trying to implement a new solver for simulate the flow inside a shot sleeve used in high pressure die casting (hpdc) process. The main features of this type of flow are:

- dynamic mesh to simulate the boundary displacement
- multiphase flow (liquid metal and air)
- temperature dependent physical properties (such as density, etc...)
- heat exchange with the solid wall
- phase change in metal due to possible solidification caused by loss of temperature

I think interDyMFoam is a good starting point but, for example, it doesn't resolve the temperature field... Also chtMultiRegionFoam could be a useful solver for determine the heat transfer between the solid and fluid region and to account for temperature dependent physical properties...

There is a way to couple this two solvers at runtime or it is necessary to compile a new solver?

The final target is to estimate the quantity of trapped air in the metal phase due to the waves system.

Any suggestion is welcome.

By the way, any progress in the development of this project will be post...

akidess July 6, 2012 02:47

If you're happy with using interDyMFoam, add the temperature equation to it. You can find all the code you need on the forum for interFoam, it should be directly usable in interDyMFoam too.

zhengzh5 May 21, 2013 17:17


Originally Posted by akidess (Post 370033)
If you're happy with using interDyMFoam, add the temperature equation to it. You can find all the code you need on the forum for interFoam, it should be directly usable in interDyMFoam too.

Hi, I'm looking to add phase-change functionality to chtMultiRegionFoam such that I can determine if there's any phase change happening within individual fluid region during the heat transfer with neighboring solid regions.

The approach I would like to take is to replace continuity, momentum and energy equations in the fluid region of chtMultiRegionFoam to account for contribution from different phases (liquid, gas), but I'm stuck on the actual implementation. I guess my problem is I'm not sure which terms within the conservation equations I should remove and/or add to get combine heat transfer with phase change.

Any suggestions will be appreciated.


e_boesso May 23, 2013 10:13

working progress
3 Attachment(s)
Hi, my work proceed and now I've implemented the temperature equation into the interDyMFoam solver.
To do this i modified the twoPhaseMixture source code to implement the possibility for varying properties of two phases (rho, cp, lambda and nu) in function of temperature
through reading files that i write.

I create a simple case to verify the solver:
- Geometry: prism with square section, one single outlet patch;
- Initial conditions: Aluminum (T=1000 K) on the bottom of the prism that fill 50% of entire height of it, the remainder is occupy by air (T=300K);
- T boundary condition: all the boundary sets the temperature to 300 K.

If i try to simulate a simple case where the wall is moving slowly the solution is optimal and nothing suggest some errors in fact i can view the results of diffusion witch change the temperature distribution near the boundaries and, so important, the convective motion of the air.
But, if i try to simulate a case where the wall is moved more rapidly, the solution give problems. Up to 0.05 s the simulation run correctly (i suppose it viewing the alpha1 field, viewing the start of wavefront) but then alpha1 go crazy. I suppose this is connected to the mesh motion but i don't understand how it is. To clarify all, i post two images that first at t=0.05 s and second at t=0.06s; both visualize only aluminum (note alpha1 threshold). The patch named "movingWall" represent the piston.
I also attach part of the log file of simulation.

Can anyone help me? All the suggestions are appreciated.

Thanks a lot! Best regards,

e_boesso June 6, 2013 05:41

I would notice that i resolved my question...I made a careless mistake because I imposed a boundary condition on all walls for temperature equal to 300 K, but this value is smaller than solidification temperature of aluminum and so the viscosity values became very hight. This causes the solver to crash.

satendra May 19, 2017 16:18

interDyMFoam with temprature equation
hii, i am also start to work with interDyMFoam and try to add temperature equation and my solver and model compiled but my results are not coming properly. so i request to anyone plz send you case file...

All times are GMT -4. The time now is 18:16.