|
[Sponsors] |
October 8, 2014, 11:10 |
|
#181 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
Very nice! I might be able to use this at a later time so I'll keep it as reference.
Do you think it will be usable for highly transient phase changes, including evaporation? |
|
October 9, 2014, 07:23 |
|
#182 | |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
Quote:
Thank you for your answer, I really appreciate it. So it's prefered yo use FSM implementation just as Rösler did in his convMeltFoam solver and correct the liquid fraction as explained in http://www.cfd-online.com/Forums/ope...tml#post467200 #80 Am I right? Thank you Rösler Thank you for all the work you did I will have a look in your thesis. Is there any way of having the index of your work so we can see the topics which are discussed? |
||
October 9, 2014, 22:53 |
method
|
#183 | |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15 |
Hi anonymous,
As I said earlier, it depends on the problem you are solving. And now I can reckon FSM will be good to use. Cheers #shakil Quote:
|
||
October 13, 2014, 09:34 |
|
#184 | |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Quote:
@ssss: I will post the index the next days. Cheers Fabian |
||
October 13, 2014, 10:01 |
|
#185 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
I think that I have been a bit unclear.
I am interested in simulating a highly transient solid->liquid->gas phase transition of a polymer, not just liquid->gas. I'm generally interested in simulating ablation flows (i.e. determine amount of ablated mass and temperature at a wall) and corresponding wall temperatures of a polymer surface in contact with a plasma with T on the order of some 10^4 K. I haven't looked into the theory any further than common heat conduction equations yet, as this is only a small aspect of my work, so I can't judge myself right now if your method is suitable for my cause. I would expect that the Darcy term is still required in this case because there will still be a solid phase which is not moving? I have also seen something similar under the term "2-phase-Stefan-problem". This is for tracking the phase-changing interfaces in a 1-dimensional case and might also be an option for me, as I expect my problem to be more or less 1D (since energy flow is largely 1D in the direction normal to the wall). |
|
October 17, 2014, 04:20 |
|
#186 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Hi chriss85
I'd say that solid>liquid>gas transition should be possible. "The only thing" you have to do is implementing the liquid to gas transition into my solver. I put that into quotes because this is no easy task. You have to account for the interface between liquid and gas by using an appropriate method like VOF etc. and extend it for phase change between the two phases. Have a look into these threads: http://www.cfd-online.com/Forums/ope...e-boiling.html http://www.cfd-online.com/Forums/ope...mentation.html http://www.cfd-online.com/Forums/ope...nge-vof-2.html Bitan Shu programmed a solver for liquid>gas transitions using interFoam as starting solver. However, there could be another solver, closer to what you search. Dig a little bit into the forum and you might find what you need. To make it short: You can not solve your problem by just using my solver. You will have to invent something on your own or at least extend some existing solver including mine. This will be no easy task. But keep foaming Cheers Fabian |
|
October 17, 2014, 06:33 |
|
#187 |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15 |
Hi FOAMers',
Have anyone worked with the chtMultiregionFOAM for melting simulation ?( OR Have anyone add the melting solver with chtMultiRegionFoam ? ) If so, it will be great if you could share the ideas how you plugged the code.... Thanks in advance #shakil |
|
October 17, 2014, 09:15 |
|
#188 | |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
Quote:
|
||
October 17, 2014, 10:22 |
chtMultiregion+melting
|
#189 |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15 |
Hi SSS,
I am solving a problem for multilayer systems. In my case I have two layer, and both of the layer has different properties and heat absorption. I have already model the case before melting. Now, I want to simulate the scenario when the top layer starts to melt; actually melting depth for the top layer. In my case, I am pretty much sure only the top layer will melt. Therefore, I have to plug in the melting code for top layer equation. If anyone can advice me how to do that, it will be great !. Thanks in advance. #shakil |
|
October 17, 2014, 11:09 |
|
#190 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
Maybe you should get the chtMultiRegion code, get rid of the turbulence parts and write your own TEqn to be solved in each of the fluid Regions.
I'm not too experienced with chtMultiRegion, but you should be able to implement it, although you will need to modify the createFields.H and the readTransportProperties, in order to get the need values for the solidification TEqn |
|
October 19, 2014, 15:54 |
|
#191 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
I would like to ask also a question about Voller Linearized Source Term implementation:
Whenever I include TEqn.H inside the PIMPLE loop (in the outerloop or in the pressure correction loop) my solution advances in time a lot, let's say it should take 1000s to have a liquid fraction of 95%, but puting TEqn.H inside loop takes the time down to 50s, although the cualitative results are fabolous, it goes much quicker. If I put the TEqn.H outside the PIMPLE loops (both of the loops) then I obtain the results I expect to have. This may be a small source of errors, because I'm not changing the temperature during both of the PIMPLE loops, and the temperature and the boussinesq density should change whenever the velocity field changes. Anyone knows why is this happening? Thank you very much. |
|
January 16, 2015, 10:52 |
|
#192 |
New Member
Mithil Parekh
Join Date: Jun 2014
Location: Germany
Posts: 1
Rep Power: 0 |
Hello,
what are DCs and DCl in TEqn in meltFoam? Mithil. |
|
January 16, 2015, 11:09 |
|
#193 |
Member
Thomas Vossel
Join Date: Aug 2013
Location: Germany
Posts: 45
Rep Power: 13 |
They form the constants in the porosity function:
The "C" in the equation is the DCl constant. The "b" in the equation is the "DCs" constant. The names might be confusing here as DCl means something like "Darcy constant large" and DCs means "Darcy constant small" - so nothing in terms of liquid or solid... Both constants are defined in the transport properties and DCs is just there to prevent a division by zero (for that purpose a tiny number gets added to the denominator) and DCl is a more or less random "big number" meant to lead to a high number for the porosity function which then leads to decreased velocities in the momentum equation. While its number is not really random as it influences how fast the velocities will decrease, it's not really a fixed number you can look up but something you adjust to your case so the results match your expectations for the respective material you're simulating... |
|
January 16, 2015, 11:11 |
|
#194 |
Senior Member
|
Hi,
readTransportProperties.H Code:
// Reading large D'arcy-type source term constant DCl dimensionedScalar DCl(transportProperties.lookup("DCl")); // Reading small D'arcy-type source term constant DCs dimensionedScalar DCs(transportProperties.lookup("DCs")); Code:
DC = DCl*Foam::pow(1.0-alpha,2)/(Foam::pow(alpha,3)+DCs); |
|
March 23, 2015, 22:10 |
species
|
#195 | |
New Member
QP Dong
Join Date: Feb 2015
Posts: 7
Rep Power: 11 |
Quote:
I am working on the segregation with openfoam. Have you been successful in the species calculation? If so, would you pleased to give me some advice, or show me your solver? Thank you ! |
||
April 8, 2015, 01:21 |
|
#196 |
New Member
Join Date: Apr 2012
Posts: 24
Rep Power: 14 |
Hi all,
I have a problem with modelling the melting/solidification of pcm in sphere by using the enthalpy method. I have to do this modelling using matlab and by using finite difference method. Hello all, I have went through all your posts and you are really doing a good job. Might my post is in the wrong place, but I decided to give it a try, since I have posted it in a different section. I have read many papers and they mentioned I have to change the enthalpy governor equation to the following, the enthalpy term to a temperature or the temperature term to enthalpy to model it easily in matlab. I have changed the temperature into enthalpy and now, all the terms in the implicit method equation are enthalpy. BUT, what about the boundary conditions, Am I need them, if so, I have them interms of temerature, how to change them into enthalpy. any help will be greatly appreciated Best |
|
May 7, 2015, 11:04 |
|
#197 |
New Member
Ole Richter
Join Date: Jun 2013
Posts: 11
Rep Power: 13 |
Hey Fabian,
I'm working on a problem you might have already solved in your PhD and therefore I would like to ask you for a hint. My Master thesis is about the simulation of casting processes including the filling, temperature transport and solidification and thus exactly the reversal of your subject. In order to add the gas phase I'm trying to combine interFoam and convMeltFoam, as you suggested earlier. Using the model of your PhD, everything seems to work out fine except the solution of the TEqn, which exploits whenever I include the calculation of the liquid fraction fl. The only thing I changed so far is the update equation of the liquid fraction. I replaced the heat capacity cp of the hole cell with a cp calculated from just the liquid and solid phase. I suggest that the new possibility of changing the fl by filling a cell instead of just melting solid is causing the trouble. By filling a cell I can produce huge differences of fl between two time steps, which the iteration algorithm for T and fl can't handle anymore. Do you come to that problem? My supervisor mentioned a smoothing function to restrict the time step if huge fl changes happen could be a solution. I haven't tried it yet, but will post again, if something works. I have to excuse, if the solution is described in your PhD. We already ordered a book through inter-library loan, but it seems to be loaned. Do you know about a library online version? If I haven't got access by next week I will buy it. (Until then I'm dealing with the googleBooks prev) Thanks, ole |
|
May 7, 2015, 14:54 |
|
#198 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
Dear kuechenrule,
The TEqn is known to create troubles in interFoam, even without working melting problems. Are you working with the fields multiplied by the density? Something like rhoCp, rhoPhiCp, etc. Which version of interFoam are you using? Are you ensuring, that the TEqn and the liquidFraction converge in each of the PIMPLE/PISO iterations? Did you try if your code works without gas phase in it? If you want to limit the timeStep, you could just change the maxDeltaT in the controlDict to the maximun value you want to achieve. Anyway I'm pretty sure you have taken care of looking at this small problems. I will be glad if I could help you trying to debug the errors that the solver gives |
|
May 7, 2015, 17:48 |
|
#199 |
New Member
Ole Richter
Join Date: Jun 2013
Posts: 11
Rep Power: 13 |
Dear SSSS,
thanks for your help! Even if I used OpenFoam a few times, I'm new in the field of programming and manipulation. Thus please mention all small problems or mistakes that you suggest I could have done. I'm working with rhoCp, rhoCpPhi, etc, since I consider big density differences. between gas and melt (liquid+solid). I'm using OF 2.3.1 (are there specific versions for each solver?) I do ensure convergence of the TEqn and fl by a fl residuum of e-6 in and a maximum iteration loop number of 150. Teqn is solved inside the PIMPLE loop. The code seems to work without a gas phase (testcase: filled open cube with cold walls; just T transport no movement at all). I'll will play with the time step a bit and try to find out, if it works. Thanks for the advice. An other question arises today for me. The PIMPLE loop features the following order: alphaEqn -> UEqn -> TEqn -> pEqn. At which point do I update rho and rhoCp etc, which are dependent on the melt fraction (alpha1) and the liquid fraction (fl)? If I update rho outside the TEqn loop, the TEqn solves a different rho as the UEqn. If I update rho inside the TEqn, UEqn solves a different rho as pEqn. I think you got the point. Or does it not matter since the PIMPLE loop runs until all rho's are nearly equal? I attached my TEqn. Please don't get me wrong, I don't want you to do my work, but maybe I did some obvious mistakes you can see. alpha1 - melt fraction; fl - liquid fraction of melt; fs - solid fraction of melt; rho1 - density of pure liquid; rho2 - density of pure gas; rhos - density of pure solid; { int iter = 0; scalar residual = 1; scalar meanResidual = 1; do { iter++; fl.storePrevIter(); rhoCp = alpha1*(fl*rho1*cp1 + fs*rhos*cps) + alpha2*rho2*cp2; lambda = alpha1*(fl*lambda1 + fs*lambdas) + alpha2*lambda2; rhoAlpha1 = alpha1*(alpha1*(fl*rho1 + fs*rhos) + alpha2*rho2); rhoCpPhi = tphiAlpha()*fvc::interpolate(rho2*cp2 - (fl*rho1*cp1 + fs*rhos*cps)) + phi*fvc::interpolate(fl*rho1*cp1 + fs*rhos*cps); rhoAlpha1Phi = fvc::interpolate(alpha1)*(tphiAlpha()*fvc::interpo late(rho2 - (fl*rho1 + fs*rhos)) + phi*fvc::interpolate(fl*rho1 + fs*rhos)); fvScalarMatrix TEqn ( fvm::ddt(rhoCp, T) + fvm::div(rhoCpPhi, T) + L*fvc::ddt(rhoAlpha1, fl) + L*fvc::div(rhoAlpha1Phi, fl) - Tmelt*fvc::ddt(rhoCp) - Tmelt*fvc::div(rhoCpPhi) - fvm::laplacian(lambda, T) ); TEqn.solve(); Tcorr = (Tl-Ts)*fl+Ts; fl = max(min(fl+alphaRel*(fl*cp1 + fs*cps)/L*(T-Tcorr),scalar(1)),scalar(0)); fs = scalar(1) - fl; residual = max(mag(fl.internalField()-fl.prevIter().internalField())); meanResidual = sum(mag(fl.internalField()-fl.prevIter().internalField())*mesh.V())/sum(mesh.V()).value(); } while ((iter < minTCorr || residual > alphaTol ) && iter <= maxTCorr); cp = alpha1*(fl*cp1 + fs*cps) + alpha2*cp2; h = cp*(T-Tmelt)+alpha1*fl*L; } Thanks, ole |
|
May 7, 2015, 18:25 |
|
#200 |
Senior Member
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13 |
Dear kuechenrule,
About the PIMPLE methods and the rho, this is the easiest way of dealing with it. With the PIMPLE or PISO iterative method you try to converge the equations, eventhough the densities may vary por each equation. Using small time-steps you could reduce the problem, because the smaller the time step the smaller the variations in density. Moreover, I would now try to eliminate the density variation with the liquid and solid, just try to use the same density for them, as it may induce some problems. Furthermore, I would also use the same cp for both liquid and solid, so that you get rid of problems that can arise from using the interpolation methods. Next, I would try to use another approach to the convMeltFoam. As you can see convMeltFoam taked into account the convective transport term for the liquidFraction, or "fl". Although this might work when there is no gas, and thus, when you are not using interFoam, once you add this term to interFoam, you are dealing with high gradients over the surfaces and thus, poblems whith the fvc::div term. At last I would try to relax the TEqn, just adding TEqn.relax() after the TEqn.solve() code. If you don't mind, I could have a look at your complete interFoam code, and try to fix it. Thank you. |
|
Tags |
melting openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Melting and solidification with free surface problem? | cqlwj123 | CFX | 6 | July 25, 2013 03:46 |
Can I solve this problem by Fluent? | Kai_kc | FLUENT | 1 | October 27, 2010 06:29 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 07:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 20:13 |
Melting Problem | M | FLUENT | 0 | April 29, 2007 17:07 |