Attached a 2D C# example; this should hopefully give you an idea about how to work with 2D arrays of data and also how to call existing code from a wrapper. It's pretty simple, but it should give you an idea of what you need to do with your own models. We can take a look at creating different exchange items if you upload a copy of the .xml file of the model to which you wish to couple.
I have just downloaded the model I attached to my reply, and it definitely contains test2dengine.dll mentioned in your message. This means there is a a problem with dependencies on your machine - I guess you do not have the Intel Fortran compiler installed? Attached to this reply is a zip with two dlls that you should place in the Test2D\bin\ folder and then try to re-run the composition. With these two dlls present in the same folder as test2dengine.dll, it should run correctly.
Unfortunately, I haven't been able to download your attachment - I have struggled to download zip files from sharepoint websites in the past, so have always changed the extension to something else (.RENAME is my preference). Could you rename the file, and re-uploading it?
From the sounds of the model you are looking to couple with, I guess we might need to use a slightly different element set to the regular grid used in my example. Not a problem, but it would help if I could take a look at the .xml file of the model you are interested in coupling with - could you include that in any remaned zip file you upload as a reply? In the mean time, i will put together a simple 2D cs example for you and post it on the forum a little later in the day.
all the best,
Posted: 25 August 2011 12:03
Subject: How to pass array using FluidEarth
Hi Gordon, 1. When try to run the pipistrelle composition you sent to me for Test2D. I got the error message "Unable to load DLL 'Test2DEngine.dll': The specified module could not be found (Exception from HRESULT: 0x8007007E)" in the log file. 2. Since this is the first time for am to use FluidEarth (although I did the training course long time ago), I think I still do not get how to pass the array between models. I created a C# project named Test2D (as attached zip file) which has a problem for inputting and outputting array. Could you please help me to check my C# files. Thanks. 3. We are trying to link groundwater model (ZOOMQ3D), a post-processing model, and two other economic models to test the concept of OpenMI. Between post-processing model and economic models, the distributed groundwater could be exchanged using XYPoint array (with same spatial resolution and same range). Now, there is another problem. Chris told me that ZOOMQ3D_OPENMI is exporting "XYPolygon" data. Could you please give me some suggestions what is the best way to exchange groundwater levels between ZOOMQ3D and the post-processing model that uses 2D array? Thanks, Lei