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

Drived Boundary Conditions

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

LinkBack Thread Tools Search this Thread Display Modes
Old   January 25, 2016, 09:59
Red face Drived Boundary Conditions
Join Date: Oct 2012
Posts: 47
Rep Power: 13
mohsen.boojari is on a distinguished road
i tried to drive a new boundary condition in heat transfer module, at the end when i tried to run wmake command , the error below showed up. can anyone help me?
thank You
`````````````````````````````````````````````````` `````````````````````````````````````````````````` ```````````````````````
convectiveHeatFluxFvPatchScalarField.C:109:64: error: invalid initialization of reference of type ‘const Foam::fvsPatchField<double>&’ from expression of type ‘const PatchFieldType {aka const Foam::fvPatchField<double>}’
patch().lookupPatchField<volScalarField, scalar>(TName_);

`````````````````````````````````````````````````` `````````````````````````````````````````````````` `````````````````````````
and this is my convectiveHeatFluxFvPatchScalarField.C file . i've attached it.
the error says problem is in line 109 !
Attached Files
File Type: c convectiveHeatFluxFvPatchScalarField.C (4.0 KB, 7 views)
mohsen.boojari is offline   Reply With Quote

Old   January 27, 2016, 11:42
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
Line 109 is:

    const fvsPatchField<scalar>& T =
        patch().lookupPatchField<volScalarField, scalar>(TName_);
I am the class you are trying to create. I am an fvPatchField. When you call patch(), I will give you my fvPatch. If you use my fvPatch to call lookupPatchField, it will return an fvPatchField. You are telling me that you want an fvsPatchField? With an 's' after the fv? That's a surface field, and is a totally different data structure. Us fvPatchFields don't play nice with fvsPatchFields. There are some functions that allow us to talk together, but they use interpolation, which introduces instabilities.

What is T supposed to be? Maybe try changing it to an fvPatchField.
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   January 27, 2016, 12:04
Join Date: Oct 2012
Posts: 47
Rep Power: 13
mohsen.boojari is on a distinguished road
yeah David. you are right. there was an addition 's' in the code .
T represent the temperature field .
mohsen.boojari is offline   Reply With Quote


boundary condition, convection, temperature

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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 08:44
GETVAR Error in Multiband Monte Carlo Radiation Simulation with Directional Source silvan CFX 3 June 16, 2014 09:49
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 06:28

All times are GMT -4. The time now is 22:31.