-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when running interFoam #2
Comments
Yes, interFoam does see kva_interfaceProperties. After all, your error message refers to my new class! ============= Now the bad news is your segfault... With the new version of this library (not yet on GitHub) I am also facing segfaults that appear inexplicably out of nowhere. It turned out that this was not a C++/code issue, but a linker issue. I am still trying to figure out what exactly I did wrong, but I'm fairly sure it is related to the ABI having changed compared to OF's libinterfaceProperties.so. ============= So let me assume that you do not have those rights, or you simply don't want to do that (after all: it would be bad practice!). Then do the following: ============= Now you will have a new interFoam in $FOAM_USER_APPBIN which is identical to interFoam (after all, we did not change its source code), but linked to my version of libinterfaceProperties.so. Let me know if this works for you. If it does, I will update the installation instructions by a slightly more proper way than what I just told you here. |
Thanks for your detailed explanation to work it out, yes now it runs without errors. Just for the last point to mention that after "hash"ing interFoam and checking it, it says P.S. Do you have an informal or internal report that shortly explains how you implemented your smoothing in VOF to add here? I know you have referred to two papers, but a brief and explicit description would be great. That would be nice since people can be aware of the implementations, and even help to improve it further :) Thanks |
I do not have any such report, no; only some rough design drawings and notes on paper. What the smoother does mathematically is applying a Laplacian smoothing filter This means that the cell centre values and interpolated to the cell face values, and then the cell face values are interpolated back to the cell centre values. This process is repeated twice (2 iterations). That is described in those papers. In fact, I only ported Hoang's implementation to OF4x: I did not write that part myself. Hoang wrote this at a solver-level. I wrote it at a library-level instead, which makes it usable for any (VoF) solver (although you sadly need to recompile your solver... but I'm looking into that). |
Thanks for explanation, But, weird is that, if I for the same case put sigma1000 or even \sigma1e-3 or even \mu_air or \mu_water *1000 or 1e-3 spurious velocities are exactly the same magnitudes at similar time steps. To me, it seems somehow you implementation has made interFoam insensitive to \sigma and/or \mu, and maybe it takes them some default values from somewhere that changing their values by the user does not affect the simulation results. Getting to know this I wanted to reproduce one of my interFoam simulations I had before, and found out that in fvSchemes "interfaceCompression" was not defined so I had to change it to something else to have it running, so I changed it to Gauss linear, to have the interFoam run, but since I changed to Gauss linear I could not make comparison and reproduce my previous results. (Seems interfaceCompression is not included in your vofsmooth! is it?) So now I decided to go back to my original default interFoam :) so I
Seems either the original implementation or the above one has modified the default OF lib files, how can I go back now? |
Alright, one thing at a time. Firstly, you say that it becomes insensitive to sigma? Did you also try that for the original interFoam? I am asking, because "vofsmooth" is about the curvature calculation; not about the surface tension force directly. That is, I do not touch sigma at all compared to the original OF. So if something is still wrong here, it might be related to the original segfault still not being resolved, but merely hidden. However, I don't think something is wrong, given the validations I did myself. Secondly, you talk about the "interfaceCompression" scheme. Personally, I have not been using that scheme. In fact, not a single tutorial in OF40 uses it, as "grep" returns empty-handed. Finally, to "go back", you should also remove (or move) libinterfaceProperties.so from $FOAM_USER_LIBBIN, which is kva_interfaceProperties. By deleting your new interFoam, you simply moved back to your first post here: the segmentation fault. The default OF lib files were not harmed in the process ;): that's where $FOAM_USER_LIBBIN is for! Since I have only just learned that we must also recompile the solver, I am considering changing this structure... I plan to look into that the coming few workdays. |
Did everything work out? |
I have improved the library to fix the SegFault. (That is, I do not get a SegFault, but that could still be luck. So I consider it fixed until someone presents me with another SegFault.) It was impossible for me to write it in an ABI-independent manner. Therefore, it is mandatory to recompile your solver as to prevent the SegFault from occurring. |
Since we are one month further, and this issue no longer occurs for me, I assume that this is fixed for everyone. If not, feel free to tell me. |
for a stationary bubble case with interFoam I am trying to use the interfaceproperties. I believe I have it compiled already and ready to use, since running
ldd $(which interFoam) | grep "interfaceProperties
gives the report
libinterfaceProperties.so => /home//OpenFOAM/platforms/linux64GccDPInt32Opt/lib/libinterfaceProperties.so (0x00007f7711a00000)
By the way, when running interFoam I get the error
What is wrong that it is not working?
I have just added
to the transport properties.
The text was updated successfully, but these errors were encountered: