|
[Sponsors] |
Custom boundary condition : type instantiation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 29, 2018, 05:34 |
Custom boundary condition : type instantiation
|
#1 |
Member
benoit favier
Join Date: Jun 2017
Posts: 64
Rep Power: 8 |
Hello,
I am using OpenFoam 6. I am trying to compile a boundary condition made to calculates a species mass fraction. (I want to set the mass fraction in order to impose a partial pressure "P_ref" of species in the gas). I created a class that inherits from "FixedValuefvPatchField". My mass fraction is roughly calculated as : Code:
(*this)[faceID] = P_ref * M / (Rho[faceID] * R * T[faceID]) However, when compiling my class, i get the error : Code:
evaporatingZinc_RDMP/evaporatingZinc_RDMPFvPatchField.C: In instantiation of 'void Foam::evaporatingZinc_RDMPFvPatchField<Type>::updateCoeffs() [with Type = Foam::Vector<double>]': evaporatingZinc_RDMP/evaporatingZinc_RDMPFvPatchFields.C:41:1: required from here evaporatingZinc_RDMP/evaporatingZinc_RDMPFvPatchField.C:153:18: error: no match for 'operator=' (operand types are 'Foam::Vector<double>' and 'double') I want to use this boundary condition on scalars only (species mass fractions ...). Is there any way to prevent this instantiation to be made ? |
|
August 30, 2018, 04:47 |
|
#2 |
Member
benoit favier
Join Date: Jun 2017
Posts: 64
Rep Power: 8 |
This was due to the fact that i tried to copy and modify the "fixedValueFvPatchField" folder instead of using the utility "FoamNewBC -f -s myBoundaryCondition" (type "foamNewBC -h" for informations on how to use).
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 07:00 |
singularity? | mihaipruna | OpenFOAM Running, Solving & CFD | 5 | April 24, 2012 17:18 |
Pressure instability with rhoSimpleFoam | daniel_mills | OpenFOAM Running, Solving & CFD | 44 | February 17, 2011 17:08 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 20:50 |