CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2022, 05:33
Default Reconstructing the surface scalar field.
  #1
Member
 
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5
saicharan662000@gmail.com 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



Code:
Foam::tmp<Foam::volScalarField>
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>
    (
      interfaceArea
    );

}

And i got error message that reconstruct is not declared


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


error:
Code:
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
saicharan662000@gmail.com is offline   Reply With Quote

Reply

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


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