|
[Sponsors] |
March 23, 2016, 13:25 |
Tensor Definition in openfoam
|
#1 |
Member
Muhammad Usman
Join Date: Feb 2014
Posts: 91
Rep Power: 0 |
Hi guys i am sorry i feel low while asking this question. I need to define a tensor in openfoam. I just did simple thing i copied following code fro programmers guide and pasted in my solver
dimensionedTensor sigma ( "sigma", dimensionSet(1, -1, -2, 0, 0, 0, 0), tensor(1e6,0,0,0,1e6,0,0,0,1e6), ); but it gives following error In function ‘int main(int, char**)’: stability.C:217:1: error: expected primary-expression before ‘)’ token ); ^ In file included from stability.C:63:0: What can be the matter... it is the simplest case..... |
|
March 23, 2016, 16:24 |
|
#2 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17 |
hello 13msmemusman
maybe the , at the end of the line starting with tensor: tensor(1e6,0,0,0,1e6,0,0,0,1e6), hope this helps Wouter |
|
March 24, 2016, 13:45 |
|
#3 |
Member
Muhammad Usman
Join Date: Feb 2014
Posts: 91
Rep Power: 0 |
thank you sir please guide me about this
Hi i added following codes in a solver. Ixz = sum((mesh.C().component(0))*(mesh.C().component(2) )*(rho*mesh.V())); I set Ixx dimensions as dimensionSet( 1, 2, 0, 0, 0, 0, 0) Whenever i run solver i get following error FOAM FATAL ERROR: Different dimensions for = dimensions : [1 2 0 0 0 0 0] = [0 0 0 0 0 0 0] I can not find why its happening. mesh.C() has a dimension of meter when summed up and rho*mesh.V() has a dimension of kg when summed up. it should have dimensions same as dimensions of Ixx. Please tell me some method to deal with it. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
OpenFOAM Foundation releases OpenFOAM® 3.0.0 | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 1 | November 7, 2015 16:16 |
OpenFOAM Foundation Releases OpenFOAM v2.3.0 | opencfd | OpenFOAM Announcements from OpenFOAM Foundation | 3 | December 23, 2014 04:43 |
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 |