|
[Sponsors] |
Function using exp() not being calculated properly |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Venkat Ganesh
Join Date: May 2020
Location: Cincinnati, Ohio
Posts: 49
Rep Power: 6 ![]() |
I'm trying to change the linear property estimation in interFoam solver to an exponential averaging by modifying the existing equation
Code:
𝜇 = 𝛾𝜇𝑙 + (1 − 𝛾)𝜇𝑔 I've modified the lines of code impacting the property estimation in three separate files (incompressibleTwoPhaseMixture.C, createFields.H, and alphaEqnSubCycle.H). I've attached the files here. The syntax I've used in alphaEqnSubCycle.H is shown below. Code:
Original Code which has been commented out: //rho == alpha1*rho1 + alpha2*rho2; Custom code: rho == rho2 + (rho1 - rho2)*(Foam::exp(scalar(25)*limitedAlpha1)-scalar(1))/Foam::exp(scalar(25)); Note: I used plot over line function on paraview and saved the data in csv format and removed the multiple entries for 0 & 1 volume fraction, to get below table. HTML Code:
Output from Openfoam Expected rho Values Based on Function alpha.water rho 0.24673 15.789 1.225006846 0.48029 37.635 1.227355937 0.69946 249.01 1.789643492 0.91413 519.61 122.15227 0.9696 772.34 485.154527 0.99854 1022.1 998.9116916 0.99996 1035 1034.965742 1 1036 1036 |
|
![]() |
![]() |
![]() |
Tags |
interfoam, programing, property estimation, vof |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 17:22 |
[snappyHexMesh] How to define to right point for locationInMesh | Mirage12 | OpenFOAM Meshing & Mesh Conversion | 7 | March 13, 2016 14:07 |
using METIS functions in fortran | dokeun | Main CFD Forum | 7 | January 29, 2013 04:06 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 13:06 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 04:37 |