|
[Sponsors] |
OpenFOAM 2312 does not read temperatureDependent surface tension |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 17, 2024, 02:44 |
OpenFOAM 2312 does not read temperatureDependent surface tension
|
#1 |
Senior Member
|
Using the solver icoReactingMultiphaseInterFoam, when surface tension is set to temperatureDependent type as shown:
( liquid and gas ) { type temperatureDependent; sigma 0.0; } the solver crashes with the error: Allowed surface tension models are: 1(constant) This all works fine in OF 2012! Please help |
|
May 21, 2024, 04:20 |
|
#2 |
Member
Lorenzo
Join Date: Apr 2020
Location: Italy
Posts: 47
Rep Power: 6 |
Hi thunde47,
icoReactingMultiphaseInterFoam uses the surfaceTensionModel defined in src/phaseSystemModels/multiphaseInter/phaseSystem/interfaceModels/surfaceTensionModels. Here, we can only find constantSurfaceTensionCoefficient. In other solvers, like interFoam, the surface tension is defined in src/transportModels/interfaceProperties/surfaceTensionModels. In this case, we can find: - constantSurfaceTension - temperatureDependentSurfaceTension I don't know about v2012, but I guess you had used "temperatureDependent" with another type of solver. Here below I write down the process in finding the surfaceTensionModel used by icoReacting: 1. I saw that in "UEqn.H" the surface tension force is declared as fluid.surfaceTensionForce() 2. in "createFields.H", fluid is declared as "multiphaseInter::multiphaseSystem& fluid = fluidPtr();", so we need to look at "multiphaseInter" class or "multiphaseSystem" class ; 3. in OpenFOAM-v2312/src we can find the folder "phaseSystemModels/multiphaseInter/phaseSystem" where you can find all the models implemented regarding mass transfer and interface models. Here, there is also multiphaseSystem, which is the class where "fluid" has been defined with in createFileds.H; 4. inside the folder "interfaceModels" you can find "surfaceTensionModels" Hope it is useful, Best regards Lorenzo |
|
May 22, 2024, 02:55 |
|
#3 |
Senior Member
|
Hi Lorenzo,
Many thanks for the reply. I have indeed tried all that you have mentioned in the post. The funny thing is that OF2012 has almost the same declarations where temperatureDependent works perfectly with icoReactingMultiphaseInterFoam. However, the declaration is slightly convoluted in phaseProperties file and it appears that directly Function1 is called. The only difference between OF2012 and OF2312 is the additional namespace in 2312 called multiphaseInter, whereas in OF2012 surfaceTension models are invoked as part of FOAM namespace directly. I tried everything inside the multiphaseInter source file but no luck. Any further suggestions? |
|
May 22, 2024, 03:42 |
|
#4 | |
New Member
subhkaran singh
Join Date: Apr 2020
Posts: 4
Rep Power: 6 |
Quote:
Hello sir, In rc/phaseSystemModels/multiphaseInter/phaseSystem/interfaceModels/surfaceTensionModels, there is only constant surface tension model. How can I modify the code to of the constant model to be temperatureDependent. The syntax is very different as compared to src/transportModels/interfaceProperties/surfaceTensionModels |
||
May 22, 2024, 05:17 |
|
#5 |
New Member
subhkaran singh
Join Date: Apr 2020
Posts: 4
Rep Power: 6 |
In MultiphaseInter:-
surfaceTensionModel(dict, pair, registerObject), sigma_("sigma", dimMass/sqr(dimTime), dict) -- I think here is the formula, How to add temperature T. In src/transportModels/interfaceProperties/surfaceTensionModels.:- It is implemented as:- surfaceTensionModel(dict, pair, registerObject), sigma_("sigma", dimMass/sqr(dimTime), dict) --surfaceTensionModel(mesh), TName_(dict.getOrDefault<word>("T", "T")),sigma_(Function1<scalar>::New("sigma", dict, &mesh)) |
|
May 22, 2024, 12:43 |
|
#6 |
Member
Lorenzo
Join Date: Apr 2020
Location: Italy
Posts: 47
Rep Power: 6 |
Hi everybody,
So actually this is interesting! I installed OF-v2012 and I checked the behavior of icoReacting on surface tension modeling, running "poolEvaporation" as a test case. I changed the surface tension "type" in phaseProperties. Value of sigma set to 0.7. of-v2012: constant --- it works of-v2012: temperatureDependent --- it works of-v2012: banana --- it works (???) So, allegedly it seems that the type word is not read, or it just takes the constant model whatever you write on that. The simulations I ran with these three keyword types were qualitatively identical (looked at pressure, temperature, velocity in Paraview). Since I just made some quick tests, I would like to ask you if you were able to see any difference with temperatureDependent model, compared to constant model. It seems to me that in OF-v2312 the bug is solved and the type is correctly read now, but it would need some more work to confirm that. I may have missed some important aspect on setting the temperatureDependent case. For what regards subhkaran's question, I think comparing Constant model and temperatureDependent model in src/transportModels/interfaceProperties/ couldbe a good starting point; then, based on the differences I would think about creating the customized model for icoReacting. Cheers, Lorenzo |
|
May 25, 2024, 02:45 |
|
#7 |
Senior Member
|
Hi Lorenzo,
You are right that merely replacing the constant by banana won't be picked up in OF2012. The way I use it is a slightly different syntax, such that sigma is called as a direct Function1 from phaseProperties file. Then, it reads the type and shows different results. The problem with OF2312 is that it stops the user from directly using the Function1 syntax on phaseProperties file. |
|
Tags |
openfoam, surfacetension |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Density averaging the surface tension term in interFoam | Venky_94 | OpenFOAM Running, Solving & CFD | 0 | March 30, 2022 12:32 |
Solution not converging with Surface Tension modeling | faizan356 | Fluent Multiphase | 0 | July 28, 2021 03:53 |
VOF +surface tension force modeling+ open channel flow+cyclic region= fatal error? | SJSW | Fluent Multiphase | 2 | November 18, 2014 05:15 |
Phase locked average in run time | panara | OpenFOAM | 2 | February 20, 2008 15:37 |
How to read surface tension? | _svl | FLUENT | 4 | January 26, 2006 10:55 |