|
[Sponsors] |
How to output user-defined volScalarField that paraFoam can read? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#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 19:31. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,268
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) |
|
![]() |
![]() |
![]() |
![]() |
#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"
|
|
![]() |
![]() |
![]() |
![]() |
#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. |
||
![]() |
![]() |
![]() |
![]() |
#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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
USER DEFINED SCALARS | yann | Phoenics | 6 | November 14, 2013 08:46 |
UDF - Derivatives for User Defined Memory Variable | Sandilya Garimella | FLUENT | 0 | January 14, 2008 10:39 |
User fortran routines, DEBUG AND OUTPUT | Bloshchitsyn Vladimir | CFX | 5 | October 29, 2007 01:31 |
User Defined Scalars - Returning Values | Carlos V. | FLUENT | 0 | April 19, 2006 18:18 |
Usage of user defined functions | Gowrish | FLUENT | 1 | October 26, 2005 07:44 |