adding new properties to chtMultiRegionFoam
Hello for all FOAM users.
I’m trying to add new solid material property to basicSolidThermo for chtMultiRegionFoam. First, I try to add my new property similarly to thermal conductivity (K) in basicSolidThermo, costantSolidThermo, isotropicKSolidThermoand and other classes, where K is mention. I simply copy lines with K and rename K to myProp. After successful compilation of library and new solver I gat fatal error: Segmentation fault. Then I try to add myProp similarly to rho in basicSolidThermo, costantSolidThermo. Result was the same. Final variant was to reject an idea of myProp and use in the solver standard property (for example sigmaS or other) that not necessary for thermal conductivity of solids. This work correct and without errors. But the main idea was not finished. Can any body advice something? Or maybe, someone have the same task. |
Greetings waiter120 and welcome to the forum!
It would be easier to help you if you could share the changes/tests you've made so far. Best regards, Bruno |
1 Attachment(s)
Hallo.
All files for compilation of new version of basicSolidTermo are in the attached file. All my adding are below the “//ttt”, so you can easy find them. Note: Lines in files directionalKSolidThermo.H/.C, isotropicKSolidThermo.H/.C and solidMixtureThermo.H.//C are added for library can be compiled. So the new functions has new name but do the same things that all other functions with Thermal Conductivity (K) do (Im just copy them from K). This is done because I don't really understand how they work. Library and solver compiles fine but when calculation is start, fatal error:Segmentation fault, appear . |
Files that are modified:
basicSolidTermo.H/.C, constantSolidTermo.H/.C, directionalKSolidThermo.H/.C, isotropicKSolidThermo.H/.C solidMixtureThermo.H./C my new material property is called : Ro |
Thanks for sharing the files, it made it a lot easier to diagnose. It's been a long week and looking only at the text made it a lot harder to visualize what you wrote.
So, what happened is this:
The solution: run Allwmake on the main OpenFOAM-2.1.x folder and it will (re)build only what needs to be adjusted to account for the changes made! Just in case, here are the commands: Code:
cd $WM_PROJECT_DIR Best regards, Bruno |
Thanks you very much. I will try yours advices.
|
Wyldckat - a lot of thanks for advices.
I try ./Allwmake and openFoam start to compile from the beginning (30min). After it my new property was successful added to basicSolidTermo. But than I decided to go back and return the original library of material properties. I recompile basicSolidTermo and than do ./Allwmake. After it all basic solvers that use basicSolidTermo library start to producing a lot of errors. So I have to reinstall openFoam. Can you give me some advices about this difficulty? |
Quote:
It'll make you like easier for keeping tracking of changes you make. |
You are right. Thanks.
|
All times are GMT -4. The time now is 10:22. |