|
[Sponsors] |
Problem with <unresolved overloaded function type> |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 18, 2021, 09:27 |
Problem with <unresolved overloaded function type>
|
#1 |
New Member
Join Date: Sep 2018
Posts: 25
Rep Power: 8 |
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 |
|
May 18, 2021, 10:21 |
|
#2 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
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
|
|
May 18, 2021, 10:46 |
|
#3 |
New Member
Join Date: Sep 2018
Posts: 25
Rep Power: 8 |
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)) ); |
|
May 18, 2021, 11:18 |
|
#4 |
New Member
Join Date: Sep 2018
Posts: 25
Rep Power: 8 |
Found the solution it should be TFluid[i] - T0 instead of T-T0
|
|
May 18, 2021, 11:18 |
|
#5 |
Senior Member
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16 |
Can you post the code snippet which is failing
|
|
May 18, 2021, 11:28 |
|
#6 |
New Member
Join Date: Sep 2018
Posts: 25
Rep Power: 8 |
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 | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
[mesh manipulation] RefineMesh Error and Foam warning | jiahui_93 | OpenFOAM Meshing & Mesh Conversion | 4 | March 3, 2018 12:32 |
[mesh manipulation] refineMesh Error | mohsen.boojari | OpenFOAM Meshing & Mesh Conversion | 3 | March 1, 2018 23:07 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 15:00 |