|
[Sponsors] |
Can't create VolScalarField based on a Dimensioned Scalar |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 23, 2014, 09:29 |
Can't create VolScalarField based on a Dimensioned Scalar
|
#1 |
Member
Pedro
Join Date: Nov 2014
Posts: 50
Rep Power: 11 |
Good Afternoon all!
I'm trying to edit a solver to include Saturation temperature. I created the following: Code:
dimensionedScalar Tsat ( "Tsat", dimensionSet(0, 0, 0, 1, 0), transportProperties.subDict("phase2").lookup("Tsat") ); volScalarField Mlv ( IOobject ( "Mlv", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), alpha2 * rho2 * ( T2 - Tsat)/ Tsat ); ); i then tried using this approach: Code:
dimensionedScalar Tsat ( "Tsat", dimensionSet(0, 0, 0, 1, 0), transportProperties.subDict("phase2").lookup("Tsat") ); volScalarField Tsati("Tsati", Tsat); I've removed the Mlv part of the code and the 2 lines before still crash by themselves. I've also replaced Tsat in " volScalarField Tsati("Tsati", Tsat);" by some other variable, e.g.: rho, and the code is compiled. How does one add a VolScalarField based on a single constat? Best Regards (i'm using ubunto 12.04 with OF 2.1.1... also i'm a linux noob) |
|
November 23, 2014, 09:49 |
|
#2 |
Member
Pedro
Join Date: Nov 2014
Posts: 50
Rep Power: 11 |
ok, never mind.....
I forgot to add code to calculate these variables in the runtime loop.... Anyway, my question for the second bit of code still stands... why doesn't it work? Best Regards |
|
November 23, 2014, 13:54 |
|
#3 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings Pedro and welcome to the forum!
Quote:
Best regards, Bruno
__________________
|
||
November 23, 2014, 17:29 |
|
#4 |
Member
Pedro
Join Date: Nov 2014
Posts: 50
Rep Power: 11 |
hi bruno
thanks for the reply. I ran the compiler so many times (wclean; wmake) today i failed to notice the text changed when there was an error the error itself is /home/pupo/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricField.C:209:1: note: candidate expects 4 arguments, 2 provided anyway, i apparently don't need to create a volscalarfield for a static variable, as soon as i added the field i want to calculate into the runtime loop everything starting to work as expected.... Thank you for your time, if you want to clear the forum out of a useless thread... please do :/ |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FATAL ERROR:Maximum number of iterations exceeded | zqlhzx | OpenFOAM Running, Solving & CFD | 4 | July 13, 2016 15:53 |
Abnormal (?) Passive Scalar behaviour | cwl | STAR-CCM+ | 1 | October 3, 2014 08:05 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 01:47 |
Dimensioned Scalar Help | physics1 | OpenFOAM Programming & Development | 2 | January 9, 2014 11:34 |
Climbing inlet pressure with simpleFoam and directMappedPatches | chegdan | OpenFOAM Running, Solving & CFD | 1 | January 2, 2012 19:35 |