Trying to integrate using snGrad(). Need some help
I am in desperate need of some help with a bit of code I'm trying to implement. I know what I need to do but so far I've been unable to code it properly! I've been struggling with this for almost 3 weeks now to no avail!! :mad:
So, here's my problem. I'm trying to find the corona current surrounding a wire in a duct. To do this I need to integrate over the surface of the wire. Inside of this integral I also need the surface normal vector of the E-field. Here's the code I have so far: Code:
Code:
Tester.C:71:44: error: no match for ‘operator[]’ in ‘Foam::fvc::snGrad(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&) [with Type = Foam::Vector<double>]()[i]’ This is a 2D problem by the way. So the magSf() should return my differential length of each cell. Any help is very appreciated and much needed!! |
Trying to integrate using snGrad(). Need some help
Dear Terry,
1.) Could you please try to change the name of your thread to something more narrative about the problem? Ideally what solver you are modifying? Unfortunately by now many people ignore threads of which the name doesn't clearly state the problem. 2.) Could you please attach the error logs you received concerning the compilation of the code? "wmake code.C &> log.error" should do the trick... 3.) Unfortunately I do not know the coding in OF well enough for such questions... Regards, Bernhard |
Bernhard,
Thanks for your help, I've edited the post but I can't seem to change the visible title in the forum, so I just started a new thread. Hopefully, that's ok. I don't want to clog up the forum with uneeded posts! |
Greetings to all!
@MechBoom: Quote:
Quote:
As for the original question, a few quick suggestions:
Bruno |
All times are GMT -4. The time now is 20:07. |