System
Kubuntu 18.04LTS
preCICE v2.1
OpenFOAM v7
CalculiX v2.15
What I am trying to do:
I am trying to run a 2-way coupling between OpenFOAM and CalculiX, but for heat transfer in of FSI.
For OpenFOAM , I took the Fluid folder from OpenFOAM (OF) adapter CHT tutorial. But I am using chtMultiRegionFoam instead of bouyantPimpleFoam.(Same as heat exchanger tutorial)
I am also using the same precice-config.xml, with only one modification of changing participant name of Solid from Solid to CalculiX .(just for a bit better readability)
I then replaced the blockMeshDict with the one from flap_perptutorial case.
And I did the necessary modification/adaptions to boundaryField of each file.
I ran this pure OF case, and it runs fines.
For CalculiX (CCX), I took the Solid folder from flap_perptutorial case same as for Fluid participant.
I have modified the flap.inp to make a COUPLED TEMPERATURE-DISPLACEMENT simulation.
I ran this pure CalculiX case under gravity and some temperature at the fix1
, this runs fine as well. (But I remove the gravity for the coupled OF+CCX simulation).
I modified the confg.yml file to have Temperature and Heat-Flux instead of FSI keywords Forces and Displacements.
Issue
My Fluid participant waits for the Solid participant, while the Solid (CalculiX) participant fails with the following error message:
---[precice] ERROR: The given Mesh ID "-1" is unknown to preCICE.
I am attaching the log file for Solid and Fluid.Fluid.log (8.9 KB) Solid.log (9.5 KB)
From preCICE perspective this means that you give a mesh ID to preCICE (with value -1) that preCICE does not know, meaning a mesh ID that you did not get from preCICE via getMeshID.
So, the problem happens in the adapter. More specifically, in the CalculiX adapter. Please check if the mesh names there in the adapter configconfig.yml match those of the preCICE config.
Yes, I checked, I even thought there might be an issue with indentation may be in config.yml, but there isn’t. I tried giving it a different mesh name, the new preCICE tells you in the error message that you should check if the mesh name matches. And I get a different, error which is mesh empty.
I have tried to keep the .inp file as close to the OpenFOAM+CalculiX heat exchanger problem, I am attaching that as well, just on case if I don’t know if I am making any mistakes in there. flap.inp (509 Bytes)
My bad, just a typo here. In the files, the participant name matches.
If there is a mismatch in the participant name or mesh name anywhere, I get the following error:
---[precice] ERROR: The provided mesh "Solid" is empty. Please set the mesh using setMeshXXX() prior to calling initialize().
Yes, I will do that immediately.
I had some issues which I could not really solve for bouyantPimpleFoam. I saw that the heat-exchanger tutorial uses chtMRF so I switched. I am able to run the solo Fluid part for chtMRF.
I just checked the solo simulation using the same flap.inp as the coupled simulation.
(Just modified the path to the files, but I have been doing the same thing a lot so I don’t think it’s the path.)
I put a 1000°K on fix1, and use 200°K in the body(Nall)
I ran this solo simulation since I was not sure about the .dfl and .flm files I exported. But I think since it did not throw any errors, the files are fine. I also cross-checked the contents with that of the heat-exchanger case and they look ok.
I have some CalculiX issues for the flow over plate problem with these files though. So I will sort these issues and push them after they are ok.
@Alphaoo1 could you please also enable debug output in preCICE and post your respective Solid.log?
It looks like you get this error, which we would like to be clearer since preCICE v2.1. Then maybe it also makes sense to open an issue about the unclear error in the precice/preice repository.
---[precice] ERROR: The given Mesh ID "-1" is unknown to preCICE.
I have commented in the PR https://github.com/precice/tutorials/pull/104 to try and resolve this issue. I believe it is because Heat-Flux works on the face centres, but in this case we have only defined the nodes of the mesh.
@MakisHPlease find the debug log file. I used the following in the .xml file for getting this output. I hope this is what you are looking for. <sink type="file" output="debug_Solid.log" filter="%Participant% = CalculiX" /> debug_Solid.log (58.5 KB)
@KyleDavisSA Should I used nodes-mesh-with-connectivity in this case, I have exported the .sur file.
Also, I want to take this chance to ask what is the difference (in terms of physical meaning) between Temperature and Sink-Temperature?
I did not use Sink-Temperature because I was not sure what it meant.
From the output I understand that it is failing here: interface->fluxDataID = precicec_getDataID( "Heat-Flux", interface->faceCentersMeshID );
but I think that @KyleDavisSA already has a lead here.
In a Dirichlet-Neumann coupling we are using Temperature and Heat flux. However, we can also do a Robin-Robin coupling, where we are using Sink Temperature and Heat transfer coefficient.
You then need to use faces-mesh in the config. The temperature was using the nodes mesh and the heatf-flux uses the faces. I am not sure what the long term affects of this change is, but the error should be solved. I don’t know if the CalculiX setup itself is correct.
Hi @Alphaoo1, hi @KyleDavisSA
I’m working on a similar setting, where I need a nodes mesh to write displacements and velocity and a faces mesh to read the pressure.
Which configuration in the yaml file did you finally chose to be able to run the simulation. Did you make any other changes than in the yaml file to solve the issue?
Thank you for your help.
Best regards, Matthias
@mattfrei Sorry for the late reply.
So, if I remember correctly, inside the CalculiX adapter, specific modules are activated for specific simulations.
So if I am not wrong, we will have to activate both the structural and thermal modules together.
If I am not wrong, here you can see only thermal is activated.
And here you see the structural module activated, which explicitly excludes the thermal part.
With the edits in this thread, the errors will go away but the end goal won’t be achieved as you have to do the module part. I haven’t modified the CalculiX adapter for this application yet, I plan to do it in the future as it is needed for my project, but the timeline for this is severely pushed. This is where I was stuck for a while. But due to comparatively lower priority, I had to move to some other work.
In any case, maybe a preCICE team member can confirm if what I suggested is correct or not.
Hi @Alphaoo1,
I’m not sure if I need both modules active for my simulation. Maybe there is a misunderstanding. I just want to configure a Faces-Mesh and a Nodes-Mesh within one FSI-Simulation. I don’t want to do a thermal analysis. All I want to do in CalculiX is write Displacements and Velocities and read Pressure. Therefore I did some changes in the adapter to be able to read the pressure on the CalculiX side. The critical point, where I think you could help me is to find the right config.yml setting for CalculiX to configure both meshes at the same time as supposed by you above:
I am trying to configure the config.yml file as follows:
So to come back to my question: I thought there were other changes that you made, that made the given config.yml work to configure both, a Faces Mesh and a Nodes Mesh, independent from the analysis type (thermal in your case?, and FSI in my case). So I hope maybe my question is more clear now and I would be glad if you can help me with it.