CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Reconstructing the surface scalar field.

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2022, 04:33
Default Reconstructing the surface scalar field.
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 96
Rep Power: 4 is on a distinguished road
hello guys,
I am using compressible interfoam solver. In one of my subroutine I used the code shown below in twoPhaseMixtureThermo.C

Foam::twoPhaseMixtureThermo::interfaceArea() const
    // return the interfacial area based on model for interfacial area
    // returns dimensions Area

    // model based on regular volume cells, taking the largest cut area
    // as maximum for area, linear increase and decrease with alpha
    const surfaceScalarField& nHatf = db().lookupObject<surfaceScalarField>("nHatf");
    volScalarField interfaceArea = reconstruct(nHatf());

    return tmp<volScalarField>


And i got error message that reconstruct is not declared

so I changed code as shown below
volScalarField interfaceArea = interfaceProperties::nHatf();

twoPhaseMixtureThermo.C:138:65: error: conversion from ‘Foam::tmp<Foam::Field<double> >’ to non-scalar type ‘Foam::volScalarField’ {aka ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>’} requested
  138 |     volScalarField interfaceArea = interfaceProperties::nHatf() * alpha1();
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

Can anyone help me with this
Thanks in advance is offline   Reply With Quote


compressibleinterfoam, openfoam, openfoam8

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
implementation of AUSMpw in OpenFOAM sanjeev_adhikari OpenFOAM Programming & Development 0 October 29, 2021 06:09
OpenFOAM error Vinay Kumar V Main CFD Forum 0 February 20, 2020 09:17
''unknown radialModelType type Gidaspow'' PROBLEM WITH THE BED TUTORIAL AndoniBM OpenFOAM Running, Solving & CFD 2 March 25, 2015 18:44
Tangential component of gradient of scalar field at surface tehache OpenFOAM Running, Solving & CFD 5 July 4, 2013 07:13
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51

All times are GMT -4. The time now is 09:59.