but
mapping:rbf-thin-plate-splines
is maybe not the best choice if your fluid (interface) mesh is large. Better use compact basis functions. Read more here: https://precice.org/configuration-mapping.html#radial-basis-function-mapping
Hello, @uekerman Benjamin, if we choose compact basis functions such as rbf-compact-tps-c2
as you recommend, is PETSc required to be installed?
@AymenAmiral1997 that's a difficult question to answer. I will rephrase your question to "which structure solver should I use for FSI with preCICE". Assuming that you are not already familiar with one of the two (which would be the natural option):
At the bottom of this page you can see that we get similar results with both.
At the end of the day, I would suggest to use deal.II or FEniCS if you are willing to edit/write some code and you want to know exactly what is going on, or use CalculiX if you want a larger palette of options already implemented.
Hello. I used to precice 1.6.1 for FSI simulation. Simulations completed with no error. Now I want to use precice 2.3.0 for same simulations. I installed and tested tutorials there are no error. I use nearest-neighbor mapping for my case and there is error "Mapping distance not available due to empty partition." and fluid stuck. I tried rbf-thin-plate-splines mapping this error does not occur but fluid still stuck. Full error text;
---[precice] Mapping distance not available due to empty partition.
---[precice] Mapping distance not available due to empty partition.
[Harun:00195] Process received signal
[Harun:00195] Signal: Floating point exception (8)
[Harun:00195] Signal code: Integer divide-by-zero (1)
[Harun:00195] Failing at address: 0x7fb4a460ceb1
[Harun:00195] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x143c0)[0x7fb4a3e7e3c0]
[Harun:00195] [ 1] /home/harun/preCICE/precice-2.3.0/lib/libprecice.so.2(_ZN7precice9partition17ReceivedPartition22createOwnerInformationEv+0xca1)[0x7fb4a460ceb1]
[Harun:00195] [ 2] /home/harun/preCICE/precice-2.3.0/lib/libprecice.so.2(_ZN7precice9partition17ReceivedPartition7computeEv+0x3ff)[0x7fb4a460d97f]
[Harun:00195] [ 3] /home/harun/preCICE/precice-2.3.0/lib/libprecice.so.2(_ZN7precice4impl19SolverInterfaceImpl17computePartitionsEv+0x1df)[0x7fb4a462cf8f]
[Harun:00195] [ 4] /home/harun/preCICE/precice-2.3.0/lib/libprecice.so.2(_ZN7precice4impl19SolverInterfaceImpl10initializeEv+0x502)[0x7fb4a463e6e2]
[Harun:00195] [ 5] SU2_CFD(+0x7176c0)[0x55ba40ad76c0]
[Harun:00195] [ 6] SU2_CFD(+0x52e704)[0x55ba408ee704]
[Harun:00195] [ 7] SU2_CFD(+0x179894)[0x55ba40539894]
[Harun:00195] [ 8] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fb4a3c9c0b3]
How can I fix this issue? Can someone help me? Thanks.
gather-scatter
with preCICE v2.3.0, have a look at the XML configuration documentation on our website. There you will find various configuration options and also the relevant tags in each of them.
Hi, I have a problem with the RBF interpolation in the fenics-x adapter. When I run my simulation I get the following warning:
WARNING:py.warnings:/usr/local/lib/python3.8/dist-packages/scipy/interpolate/rbf.py:257: LinAlgWarning: Ill-conditioned matrix (rcond=5.53004e-22): result may not be accurate.
self.nodes = linalg.solve(self.A, self.di)
I found out that the interpolated values in my coupling_expression differ by 10°C from those in precice.read_data() and the simulation diverges. Do you have any idea how I could debug that?
When I set the values from precice.read_data() manually on my coupling expression the simulation works well.
The interpolation problem might not be well-defined if you map along an axis-symmetric surface. This means, preCICE tries to compute, for example, a 3D interpolant out of 2D information. If so, preCICE throws an error RBF linear system has not converged or Interpolation matrix C is not invertible. In this case, you can restrict the interpolation problem by ignoring certain coordinates, e.g. x-dead="true" to ignore the x coordinate.
I found out the following: It's better with the Rbf (max error of 15%) compared to segregated_interpolant_2d (max error of 19%). I used the following code
from scipy.interpolate import Rbf
from scipy.linalg import lstsq
import numpy as np
coords_x = np.loadtxt("interpolation_coords_x.txt")
coords_y = np.loadtxt("interpolation_coords_y.txt")
data = np.loadtxt("interpolation_data.txt")
def segregated_interpolant_2d(coords_x, coords_y, data):
...
rbf_interp = Rbf(coords_x, coords_y, data)
print(max(abs((rbf_interp(coords_x, coords_y) - data)/data)))
seg_interp = segregated_interpolant_2d(coords_x, coords_y, data)
print(max(abs((seg_interp (coords_x, coords_y) - data)/data)))
with coords, data exported from the simulation.
Both errors look too large to me. Rbfs are interpolating, so I would expect a much lower error. Here just an example with artificial data:
from scipy.interpolate import Rbf
import numpy as np
x = np.random.rand(100)
y = np.random.rand(100)
d = np.random.rand(100)
rbf = Rbf(x,y,d)
print(np.max(abs((rbf(x,y) - d)/d)))
If your data fluctuating a lot, the error might become large, though. I can simulate this effect with my toy example, by artificially scaling some values:
from scipy.interpolate import Rbf
import numpy as np
x = np.random.rand(100)
y = np.random.rand(100)
d = np.random.rand(100)
d[::2] *= 1000000
rbf = Rbf(x,y,d)
print(np.max(abs((rbf(x,y) - d)/d)))
Because this starts to look complicated and I don't really see a clear solution: Can we move to discourse? https://precice.discourse.group/
Then you could also share your data and I can take a look at it.
rbf = Rbf(coords[0,:], coords[1,:], data, function='thin-plate')
and did not get any error. Without the added basis function I was able to recreate the problem.