|
[Sponsors] |
Transform volSymmTensorField to volTensorField |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 6, 2022, 06:30 |
Transform volSymmTensorField to volTensorField
|
#1 |
New Member
Sean
Join Date: Apr 2022
Posts: 5
Rep Power: 4 |
Hi!
I'm working on a customized turbulence model in OF7. Somewhere in the calculations I have to add volSymmTensorField and volTensorField which I can't figure out. On the forum I've seen one post about this, where it was suggested to multiply the volSymmTensorfield with tensor(1, 0, 0, 0, 1, 0, 0, 0, 1) if the computational overhead was not that important, which it isn't since they are very small 2D cases. See below: Code:
tauij_ = -2*nut() * S & tensor(1, 0, 0, 0, 1, 0, 0, 0, 1); The error message is: Code:
no match for ‘operator=’ (operand types are ‘Foam::volTensorField {aka Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh>}’ and‘Foam::tmp<Foam::DimensionedField<Foam::SymmTensor<double>, Foam::volMesh> >’) tauij_ = -2*nut() * S & I Code:
S.component(1) = S_symm.component(1); S.component(2) = S_symm.component(2); S.component(3) = S_symm.component(3); S.component(4) = S_symm.component(2); S.component(5) = S_symm.component(4); S.component(6) = S_symm.component(5); S.component(7) = S_symm.component(3); S.component(8) = S_symm.component(5); S.component(9) = S_symm.component(6); PS: these are the same right? Code:
I = tensor(1, 0, 0, 0, 1, 0, 0, 0, 1) |
|
April 22, 2022, 08:21 |
|
#2 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hi,
could you provide the equation you want to add in OpenFOAM? Maybe it is possible to find a way to implement it. |
|
Tags |
programing, transformation tensor, volsymmtensorfield, voltensorfield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
eigenValues of volTensorField | xuegy | OpenFOAM Programming & Development | 8 | February 26, 2021 17:46 |
create volTensorField in rhoCentralFoam | SKLee | OpenFOAM Running, Solving & CFD | 1 | December 30, 2012 04:36 |
flux limiter involving tensor : How to use fvc::flux() with volTensorField ? | Cyp | OpenFOAM Programming & Development | 2 | January 21, 2011 05:36 |
Transformation of volSymmTensorField to volTensorField | svens | OpenFOAM | 2 | November 19, 2009 06:47 |
Question on Hilbert Transform | Wen Long | Main CFD Forum | 1 | April 29, 2004 06:58 |