|
[Sponsors] |
May 14, 2019, 05:47 |
Extract data with c++ code
|
#1 |
New Member
Maxime
Join Date: Mar 2019
Location: Paris
Posts: 5
Rep Power: 7 |
Hi everyone,
I am currently working on a fsi model and I need to create my own routine to set an external effort on my solid. The question is: how can I extract my Usolid at each time step to use them after. I've tried something like: Code:
double uSolidExtracted[3][nbElem]; uSolidExtracted = Usolid.boundaryField()[myPatch]; Code:
error: incompatible types in assignment of 'Foam::fvPatchField<Foam::Vector<double> >' to 'double [3][nbElem]' Maxime. |
|
May 14, 2019, 06:18 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
You are trying to pass a double array to a vector patch field, that's why you can't compile. uSolidExtracted should be a type of fvPatchField<Vector<double>>, not a double. And It'll be fine. I don't know your problem exactly but I think it is a bit easier to use a coded BC or write your own BC. Then you can manipulate your boundary faces in the correct place, not inside the solver. |
|
May 14, 2019, 07:36 |
|
#3 |
New Member
Maxime
Join Date: Mar 2019
Location: Paris
Posts: 5
Rep Power: 7 |
Thank you for the reply
Yes I will consider to code my own BC |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
extract data from graphs in paraView (paraFoam) | vitorspadetoventurin | OpenFOAM Post-Processing | 1 | November 24, 2014 02:39 |
How to extract data from a specific layer of the grids? | ripperjack | OpenFOAM Post-Processing | 1 | October 29, 2014 08:57 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 10:52 |
data exchange between two binary code | rt | Main CFD Forum | 0 | May 30, 2007 05:37 |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 15:56 |