Closed Eravalord closed 4 years ago
Perhaps a 2D drawing would be helpful to get a clearer picture, but it sounds like this example should help you.
I made a magnificent sketch as an aid, I hope it clarifies my problem: So basically every pore and throat would be kept from the left side of Nw1 and from the right side of Nw2 in the combined Nw, however throats crossing boundary should be trimmed, and instead of those, new connections should be made between pores on the right and left side of the boundary (function 'stitch' has an option to connect pores in such a way).
I think the main difference between my hypothetical scenario is that I would like to "cut" the network at a certain coordinate, and eventually create an indentical big network as the previous two, whereas in this example the new network is going to expand in space, or am I wrong?
The color-coding is great!
So, the 'stitching' example I pointed you to is still relevant, but you'll have to go though a few hoops. Let me try to enumerate the steps:
That should do it, but nothing ever quite works right on the first try...so let me know how it goes.
I am almost finished with the problem exactly in the way you proposed, however the stitching does not work for this very particular reason: Does it have anything to do with the fact that phases are added as well?
We have relaxed that limitation in the latest versions, but I'm not sure we've merged it into the release branch yet. The problem is that we don't know what values to put into the new locations. Say you've set pore.temperature to 333K in all pores on network 1, but you just added a bunch of new pores...we don't know their temperature. In our new version we just put nans everywhere, including converting integer arrays to float arrays (since there is no nan for ints). We have one more feature to add to the current dev before we do a new release, so it won't be long. Do you know how to checkout the git repo and run openpnm from source?
If an algorithm will be run, and it does not rely on previously calculated data, basically it is not necessary to know those values, right? Unfortunately, I do not know how to do that, would it make possible to reach the latest unreleased updates?
I anticipated your question and I just made a tutorial for this. It's a bit rough around the edges and could use some edits. Perhaps you could give me some feed back on how it may be improved, or better yet, make edits yourself, and make a pull request to have your edits merged in?
I have tried this out, but unfortunately still drops the same error:
Thank you, this small tutorial was really useful! For me it was a bit hard to get out information from it at first, a bit more indention and less text would highlight and make the point more transparent!
I am so sorry...I fixed this in the merge and extend functions, where the problem actually happened, but forgot to remove it from the stitch function. I will push a fix asap, on a branch called 'fix_stitch_phase_limit', so you can pull that branch and try it out.
Thank you very much, that would be really nice, especially if it worked as well after the fix! 😃
In the meantime I have tried out the stitching, and it works with the dev, thank you very much once again! However, I encountered a problem connected to the geometry: How can I import geometry from donor geometry to main geometry including all pore and throat data? These values are not automatically included in the main geometry after stitching.
Hmmm, I would have thought that the geometric properties of the donor were kept and transferred to the recipient. Can you do print(net1.project)
? It should have 1 network and 2 geometries.
True, you are right! Actually, there is just one geometry, but all the pores and throats were merged into that one. Nevertheless, visualization did not work (saving to VTK), although network health is shown as good.
OK, I have been able to reproduce this error when stitching two cubic networks together. I will work on a fix this morning.
Hello!
I am trying to use a similar method to stitch two phases in the extracted network. My 3D geometry has three phases. I have extracted PNM using the snow algorithm and now I need to stitch two phases such as I could use the stitched phase as a single domain (with two subdomains). During stitching operation, I have to use all the pores (internal and boundary), but I am getting this error
'NoneType' object has no attribute 'geometries'
I am not able to pass it through this. I want to understand what should I change to stitch the networks.
Thank you for your help! :)
I'm sorry, but it's not really clear from your explanation what you're trying to get. Could possible draw a 2D example?
BTW, the error your getting is an OpenPNM object management issue, not any sort of fundamental block. Once I see what you're trying to do I may be able to suggest a plan. If not, then I can take a look at your code to see about that error.
Thank you so much for the super quick reply :)
Phase 1 and phase 2 undergoes a chemical reaction and forms one solution. The solution then reacts with Phase 3. Hence, to solve the first reaction chemistry, I am planning to use merge phase 1 with 2
The steps I followed here are
error
Could you use the new snow2 algorithm in porespy v2? It automatically extracts networks for multi-phase images.
https://porespy.org/modules/generated/porespy.networks.snow2.html
Hello everyone!
I am thinking about stitching together networks in such a manner that for example I take 2 times 10x10x10 networks with x width, and I would like to create a new network in which every pore and throat below x/2 (width) inherits 1st network's properties, and above x/2 inherits 2nd network's properties (so connections, geometries remain). Throats which overlap with both sides should be trimmed, and connections should be made with the closest possible pores at the boundaries. I would like to inquire if there is any command that could help me or do I have to create this function from the very beginning?
Thank you for your help! :)