|
[Sponsors] |
How to output user-defined volScalarField that paraFoam can read? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 29, 2013, 19:11 |
How to output user-defined volScalarField that paraFoam can read?
|
#1 |
Senior Member
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14 |
Hi Foamers,
I have a question about how to write out a volScalarField derived from existing field: The existing volScalarFields are : Code:
... volScalarField alpha1 ( IOobject ( "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); .... volScalarField voidfraction // volume fraction of fluid, the rest is solid phase within one cell ( IOobject ( "voidfraction", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); Code:
volScalarField alpha1Voidfraction ( IOobject ( "alpha1", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), alpha1*voidfraction //mesh ); Basically I just want to write out "alpha1*voidfraction" and "(1-apha1)*voidfraction" everywhere in the fluid domain, does someone have such experiences on this issue? Any advice or recommendation will be highly appreciated. Cheers, David Last edited by keepfit; September 29, 2013 at 20:31. |
|
September 30, 2013, 08:51 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
well, you can use paraView calculator filter to calculate such expression
__________________
My Personal Website (http://nimasamkhaniani.ir/) Telegram channel (https://t.me/cfd_foam) |
|
September 30, 2013, 08:56 |
|
#3 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
You name the field "alpha1" (in IOobject), this is also what paraview/parafoam shows. Put the correct name here, e.g. "alpha1Voidfraction"
|
|
October 14, 2013, 03:33 |
|
#4 | |
Senior Member
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14 |
Quote:
It shows perfect in paraview. However, I couldn't figure out why the volScalarField "alpha1Voidfraction" remains the initial status, even the alpha1 field changes. Thnaks. |
||
February 7, 2014, 08:50 |
|
#6 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
Very late answer:
For the field alpha1Voidfraction you probably do not want to read it, because it is always calculated as suggested in comment #5. So you should probably change IOobject::MUST_READ to IOobject::NO_READ in the definition of that field. |
|
Tags |
alpha1, paraview |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
USER DEFINED SCALARS | yann | Phoenics | 6 | November 14, 2013 09:46 |
UDF - Derivatives for User Defined Memory Variable | Sandilya Garimella | FLUENT | 0 | January 14, 2008 11:39 |
User fortran routines, DEBUG AND OUTPUT | Bloshchitsyn Vladimir | CFX | 5 | October 29, 2007 02:31 |
User Defined Scalars - Returning Values | Carlos V. | FLUENT | 0 | April 19, 2006 19:18 |
Usage of user defined functions | Gowrish | FLUENT | 1 | October 26, 2005 08:44 |