|
[Sponsors] |
How to convert ScalarField into VolScalar Field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 22, 2022, 02:25 |
How to convert ScalarField into VolScalar Field
|
#1 |
New Member
Join Date: Jun 2022
Posts: 10
Rep Power: 4 |
I am using a scalarField 'skewness' and assigning it to volScalarField I have created called as 'skewFactor' so that I can calculate 'skewness' run-time and use it as volScalarField for my problem. I have done following changes in my solver. I am using 'interFoam' solver.
//added following files #include "cellQuality.H" #include "unitConversion.H" #include "SubField.H" //created object to use cellQuality.C file functions const cellQuality& cQ = mesh; //custom field which I have created volScalarField skewFactor ( IOobject ( "skewFactor", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("skewFactor", dimless, 0) ); //assigning skewness calculated from skewness function from cellQuality.C file to volScalar Field skewFactor skewFactor.internalField()=cQ.skewness(); the error is : error: no operator "=" matches these operands operand types are: const Foam:imensionedField<Foam::scalar, Foam::volMesh> = Foam::tmp<Foam::Field<Foam::scalar>> |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
overPimpleDyMFoam rotating airfoil startup problems | jantheron | OpenFOAM Running, Solving & CFD | 1 | May 20, 2020 05:55 |
funkySetBoundaryFields - Manipulation of existing field | jhertel | OpenFOAM Pre-Processing | 16 | May 18, 2020 07:32 |
[swak4Foam] swakExpression not writing to log | alexfells | OpenFOAM Community Contributions | 3 | March 16, 2020 19:19 |
Access to field which is evaluated at the moment | Tobi | OpenFOAM Programming & Development | 6 | April 19, 2017 14:09 |
How does one convert a scalarField into a volScalarField | Marco Kupiainen (Kupiainen) | OpenFOAM Running, Solving & CFD | 23 | August 4, 2016 10:43 |