I am coupling a microscopic and macroscopic CFD simulation to each other and have a question relating to the Micro-Manager. I would like to have a micro simulation for each cell in my macroscopic mesh. However, I am unsure where I define this. Do I need to define a variable in the CFD adapter and pass it to the Micro-Manager and if so, where do I do this?
The Micro Manager creates one micro simulation for every macro coordinate. So in your CFD adapter you do not have to do anything special. You simply define the coordinates and set the mesh in preCICE. The Micro Manager will then access this mesh and create micro simulations corresponding to each coordinate.
thank you for your swift reply. My issue arises after starting both the micro and macro participant of my simulation. The macro participant (for testing purposes) is a simple mesh consisting of five cells, the set up and initialization of which works fine, however the micro participant returns the following error message:
Traceback (most recent call last):
File "/home/precice/micromanager/micromanager/lib/python3.12/site-packages/micro_manager/micro_manager.py", line 659, in _solve_micro_simulations
micro_sims_output[count] = sim.solve(micro_sims_input[count], dt)
~~~~~~~~~~~~~~~~^^^^^^^
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/precice/micromanager/micromanager/bin/micro-manager-precice", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/precice/micromanager/micromanager/lib/python3.12/site-packages/micro_manager/__init__.py", line 42, in main
manager.solve()
File "/home/precice/micromanager/micromanager/lib/python3.12/site-packages/micro_manager/micro_manager.py", line 218, in solve
micro_sims_output = micro_sim_solve(micro_sims_input, dt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/precice/micromanager/micromanager/lib/python3.12/site-packages/micro_manager/micro_manager.py", line 672, in _solve_micro_simulations
self._mesh_vertex_coords[count], micro_sims_input[count]
~~~~~~~~~~~~~~~~^^^^^^^
IndexError: list index out of range
I assume for some reason the number of micro simulations does not correspond to the number of macro coordinates or am I misinterpreting the error message? Do you have an idea what I might be doing wrong?
Which version of the Micro Manager are you using? And can you please check if you are correctly defining the macro_domain_bounds in the Micro Manager JSON config file?
Are you sure that the read_data_names field should be empty? This essentially means that you are telling the Micro Manager that there is no macro data to be read from preCICE and passed to the micro simulations.
For Micro Manager v0.6.0, we moved from using dictionaries to using lists for read_data_names and write_data_names. So, write_data_names would be ["k11", "k22", "k33"].
Just to confirm, the macro_domain_bounds should have the minimum and maximum bounds of the macro domain in each axis (X, Y, and Z).