|
[Sponsors] |
Problem with <unresolved overloaded function type> |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Join Date: Sep 2018
Posts: 25
Rep Power: 7 ![]() |
Dear OpenFOAMers
I'm trying to implement conjugate heat transfer into my phase change model, however I have a problem when implementing a volScalarField rho, which depends on the volScalarField T (temperature). This is the code I use to define the temperature field: Code:
PtrList<volScalarField> TFluid(fluidRegions.seize()); TFluid.set ( i, new volScalarField ( IOobject ( "T", runTime.timeName(), fluidRegions[i], IOobject::MUST_READ, IOobject::AUTO_WRITE ), fluidRegions[i] ) ); Code:
error: no match for 'opertor-' (operand types are '<unresolved overloaded function type>' and 'FOAM::dimesnionedScalar' If you need additional information feel free to ask. regards, Jeroen |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 613
Rep Power: 15 ![]() |
The problem is you try to subtract from a scalar 1 a dimensionised scalar beta. The operation is not defined anywhere. You need either to write beta.value() or assign the correct dimension to 1
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Join Date: Sep 2018
Posts: 25
Rep Power: 7 ![]() |
Thank you for your response, but I think the issue is not the beta function, as this worked before like this:
Code:
volScalarField rho ( IOobject ( "rho", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), rhoLiquid*(scalar(1) - beta*(T - T0)) ); |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Join Date: Sep 2018
Posts: 25
Rep Power: 7 ![]() |
Found the solution it should be TFluid[i] - T0 instead of T-T0
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 613
Rep Power: 15 ![]() |
Can you post the code snippet which is failing
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
New Member
Join Date: Sep 2018
Posts: 25
Rep Power: 7 ![]() |
This is the original
Code:
rhoFluid.set ( i, new volScalarField ( IOobject ( "rhoLiquid", runTime.timeName(), fluidRegions[i], IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), refRhoLiquid*(scalar(1) - beta*(T - T0)) ) ); Code:
rhoFluid.set ( i, new volScalarField ( IOobject ( "rhoLiquid", runTime.timeName(), fluidRegions[i], IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), refRhoLiquid*(scalar(1) - beta*(TFluid[i] - T0)) ) ); |
|
![]() |
![]() |
![]() |
Tags |
multiregions, overloaded function, phase change, temperature |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 11:04 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 04:18 |
[mesh manipulation] RefineMesh Error and Foam warning | jiahui_93 | OpenFOAM Meshing & Mesh Conversion | 4 | March 3, 2018 11:32 |
[mesh manipulation] refineMesh Error | mohsen.boojari | OpenFOAM Meshing & Mesh Conversion | 3 | March 1, 2018 22:07 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |