recirculation boundary condition

More
5 years 1 month ago #263 by mbastani
Hi ,

I was wondering if there is any way to change boundary condition after each time-step? Using MATLAB we can kill iCP+COMSOL SERVER , change the json file (to tell it to read from the previous checkpoint), introduce new boundary condition for the checkpoint, open COMSOL SERVER and run the new json file. This process has two issues : 1- killing and opening the platforms takes a long time 2- the boundary files should have been created beforehand in the format of the checkpoint BC file. This method works good if we have only 3-4 periods of change in boundary condition during the simulation time and we know the boundary condition beforehand.

But if we want to change the boundary condition after each time-step , using this method does not make sense. To make it more clear, imagine we have two wells (injection/extraction) and the extracted solution from well 1 is going to be added with another solution and together they will be the injection boundary condition for well 2. ( Even here we should tell iCP to just use the output data of the well 1 boundary and not the whole study domain ... which I think this will be possible by selecting well 1 boundary in COMSOL and introduce it in json file)

Please let me know if there is a better way to handle this problem.

Thanks,
Mehrdad

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #264 by bshafei
Hello Mehrdad,
Hope all is well. As I am familiar with your project, the approach we applied last time to simulate changing boundary conditions (both the locations of extraction/injection and composition of the solution) is currently the most feasible one. I understand that the opening and closing of servers can be time-consuming at each period but in order to restart the new simulations with new setup, this process has to be performed. The second part of the issue you've brought it up ( i.e. "the boundary files should have been created beforehand in the format of the checkpoint BC file") can be improved but that would need some new developments in iCP.

Regarding the example of wells, let's say the extracted solution out of well1 is SOL1 which will be injected o well 2 along with another solution SOL3 t. SOL 1 and SOL3 have different chemical compositions (different Phreeqc chemical files) and it is not possible to assign two Phreeqc files to one selected boundary of well2. These two solutions have to be equiliberated and used as boundary flow for well2.

Best,
Babak

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #265 by mbastani
Hi Babak,

Thank you for your reply. As for the previous project, you're right . that was a good method to deal with changing boundary conditions and it worked properly .... Regarding this new project, lets say for now that we want to inject the SOL1 into the well2 (assuming no SOL3). So, the question is how can we use the extracted solution as boundary condition for the injected well at each time step ? ... like a recirculation between two wells.



Thanks,
Mehrdad

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #266 by mbastani
.... Assume we have time steps of 60 seconds. The process of modeling (considering the programming with Matlab) takes more than 60 seconds. each time iCP wants to read Comsol and assign BC, IC (takes about 25 seconds) and then the calculation of flow/transport/chemistry (takes about 25 seconds) and the rest of programming stuff (about 15 seconds). Meaning that for simulating something that happens 60 second in the real world , we need 60 seconds of running the model !!!

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #267 by bshafei
Hello Mehrdad,
I was discussing this question with my colleagues and it seems this can be solved through using "Pairs"-->"Identity Boundary Pair" which are defined under definition node in COMSOL. You can define your extraction and injection points of the wells as "pairs". Then under your "Molal Solute Transport" node, you can apply continuity boundary condition on the pairs. We have not tried this capability of COMSOL with iCP and not sure if it is gonna work. But it worth to try.

Babak
The following user(s) said Thank You: mbastani

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #268 by mbastani
Hi Babak,

That sounds interesting! I've never used Continuity BC before .. I tried to make a simple model in Comsol 5.0 using "Darcy" and "Transport" modules because for running iCP , first the Comsol file should work fine. But it seems that even in this step, I can not use Continuity properly. The file is attached. May I ask you (or one of your colleges) to take a look at it, please. Maybe you guys can let it run. It's a very simple system of injection/extraction wells.

Thanks,
Mehrdad
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.198 seconds
Powered by Kunena Forum