CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Tensor list in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 24, 2024, 15:59
Default Tensor list in OpenFOAM
  #1
New Member
 
Mateus Marques Brainer
Join Date: Mar 2024
Posts: 2
Rep Power: 0
mat_brain is on a distinguished road
Hello guys, i defined a variable k as a tensor, where ∇k∇T = 0, like this:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  11
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       volTensorField;
    object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [1 1 -3 -1 0 0 0];

internalField   nonuniform List<tensor> 
8
(
    tensor(7 0 0  0 7 0  0 0 7)
    tensor(3 0 0  0 3 0  0 0 3)
    tensor(3 0 0  0 3 0  0 0 3)
    tensor(7 0 0  0 7 0  0 0 7)
    tensor(3 0 0  0 3 0  0 0 3)
    tensor(7 0 0  0 7 0  0 0 7)
    tensor(7 0 0  0 7 0  0 0 7)
    tensor(3 0 0  0 3 0  0 0 3)
);
But it's giving me an error, what am i doing wrong?
The error:
Code:
--> FOAM FATAL IO ERROR:
Expected a '(' while reading VectorSpace<Form, Cmpt, Ncmpts>, found on line 22 the word 'tensor(7'

file: /home/.../k at line 22.

    From function Foam::Istream& Foam::Istream::readBegin(const char*)
    in file db/IOstreams/IOstreams/Istream.C at line 92.
mat_brain is offline   Reply With Quote

Reply

Tags
openfoam, tensors


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 12:58
How to develop OpenFOAM with CMake and popular IDEs cosscholar OpenFOAM Programming & Development 0 March 16, 2022 16:17
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 14:36
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 19:07


All times are GMT -4. The time now is 09:23.