Total liquid volume fraction vs Time
Hello Everyone,
I am simulating melting process by modifying buoyantBoussinesqPimpleFoam. I have calculated the total liquid volume fraction as follows: Code:
dimensionedScalar tlf = (sum(mesh.V()*lf))/(sum(mesh.V())); where, lf is the local liquid volume fraction. Now, I want to write a dat/xy file to plot tlf vs time. Kindly, please guide me to achieve this. Thank You. |
You can store your data tlf values in an array and save it to a file.
Code:
|
Quote:
Thank you so much for your kind help. I tried the code you provided. But, I am unable to compile after adding the code. My solver.C file is as follows: Code:
\*---------------------------------------------------------------------------*/ Code:
meltFoam.C: In function 'int main(int, char**)': Thank You. |
Sorry, I forgot to call the value() method of dimensionedScalar variable tlf.
Code:
\*---------------------------------------------------------------------------*/ |
Good morning mam,
Thank you so much. It worked perfect. Thank You. With Thanks, Pavithra. |
Just to solve the issue of sorting, we have to change the key to scalar (double) instead of word (string).
Code:
\*---------------------------------------------------------------------------*/ |
Thank you so much mam. It works perfect.
|
2 Attachment(s)
Hi Everyone,
I have attached the solver which I was trying to make. The solver is based on buoyantBoussinesqPimpleFoam. The enthalpy-porosity method proposed by Voller & Brent has been employed. This solver can be used for isothermal and non-isothermal melting. The solvers perform adequately well for Gallium melting case and 1-D Stefan problem. The solver is compiled and tested in OF v6. Any advice or suggestions for improvements are welcome. Also, please give me a direction to make this solver work in parallel. At present, this solver works well in single core but, crashes while using mpirun. Thank You. - Pavithra |
4 Attachment(s)
Hi Everyone,
I am attaching the results of some validation cases, herewith. I have attached the solver, cases and results. Any suggestions for improvements are welcome. Thank You. - Pavithra |
All times are GMT -4. The time now is 20:06. |