CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to output other properties?

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2016, 08:39
Default
  #21
Member
 
Join Date: May 2015
Posts: 68
Rep Power: 10
hcl734 is on a distinguished road
Ok it works for mu, rho, alpha and psi using function objects and chtMRSF.

I am trying to implement the output of Cp for chtMultiRegionSimpleFoam.
I tried to do it in analogy to rho adding the following to createFluidFields.H

Code:
    PtrList<volScalarField> CpFluid(fluidRegions.size());


        Info<< "    Adding to thermoFluid\n" << endl;

        thermoFluid.set
        (
            i,
            CpThermo::New(fluidRegions[i]).ptr()
        );

    Info<< "    Adding to CpFluid\n" << endl;
    CpFluid.set
    (
        i,
            new volScalarField cp_output
        (
            IOobject
            (
            "Cp",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
            ),
            thermoFluid[i].Cp()
        )
    );
and to setRegionFluidFields

Code:
    volScalarField& Cp = CpFluid[i];

When compiling I get the error message

Code:
In file included from chtMultiRegionSimpleFoamMuCp.C:71:0:
fluid/setRegionFluidFields.H:7:21: warning: unused variable ‘Cp’ [-Wunused-variable]
     volScalarField& Cp = CpFluid[i];

Could you help me with that one?
hcl734 is offline   Reply With Quote

Old   January 2, 2019, 22:32
Default
  #22
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 7
calf.Z is on a distinguished road
If I want to use writeObjects functions , but some properties are not available, such as kappa Cp. Should I build volScalarField kappa/Cp in creatFields.H then use writeObjects?

Or are there other methods to present kappa Cp in post-processing? I want to see the relationship between T and Cp/kappa. Thank you.
calf.Z is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
error message cuteapathy CFX 14 March 20, 2012 06:45
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 12:30
Two-Phase Buoyant Flow Issue Miguel Baritto CFX 4 August 31, 2006 12:02


All times are GMT -4. The time now is 01:21.