CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

adding new properties to chtMultiRegionFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2013, 15:56
Default adding new properties to chtMultiRegionFoam
  #1
New Member
 
Join Date: Sep 2011
Posts: 15
Rep Power: 15
waiter120 is on a distinguished road
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.
waiter120 is offline   Reply With Quote

Old   February 2, 2013, 08:07
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   February 2, 2013, 13:32
Default
  #3
New Member
 
Join Date: Sep 2011
Posts: 15
Rep Power: 15
waiter120 is on a distinguished road
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 .
Attached Files
File Type: gz basicSolidThermo.tar.gz (14.1 KB, 30 views)
waiter120 is offline   Reply With Quote

Old   February 2, 2013, 15:40
Default
  #4
New Member
 
Join Date: Sep 2011
Posts: 15
Rep Power: 15
waiter120 is on a distinguished road
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
waiter120 is offline   Reply With Quote

Old   February 2, 2013, 16:13
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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:
  1. You added a new public variable and associated methods.
  2. You re-built this modified library.
  3. You adapted a tutorial case and ran the applications...
  4. Result: crash.
The reason is simple: since you added new public variables and methods, you also have to build the libraries and applications that depend on this modified library.


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
./Allwmake
One important detail: if you copied or renamed this folder "basicSolidThermo" to another place, the modified header files won't be picked up by the libraries and applications that depend on them during the building process. Therefore, since you modifying this critical library (has several base definitions), it's best that you keep the code where it was originally, modify it and (re)build it there.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 3, 2013, 07:26
Default
  #6
New Member
 
Join Date: Sep 2011
Posts: 15
Rep Power: 15
waiter120 is on a distinguished road
Thanks you very much. I will try yours advices.
waiter120 is offline   Reply With Quote

Old   February 4, 2013, 14:00
Default
  #7
New Member
 
Join Date: Sep 2011
Posts: 15
Rep Power: 15
waiter120 is on a distinguished road
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?
waiter120 is offline   Reply With Quote

Old   February 5, 2013, 06:18
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by waiter120 View Post
Can you give me some advices about this difficulty?
I suggest that you start using Git
It'll make you like easier for keeping tracking of changes you make.
__________________
wyldckat is offline   Reply With Quote

Old   February 5, 2013, 06:51
Default
  #9
New Member
 
Join Date: Sep 2011
Posts: 15
Rep Power: 15
waiter120 is on a distinguished road
You are right. Thanks.
waiter120 is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, properties, thermal coductivity


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with running chtMultiRegionFoam after using setSet utility Victor OpenFOAM 12 March 24, 2023 01:01
chtMultiRegionFoam, error while when defining the thermodynamic properties nakor OpenFOAM Running, Solving & CFD 0 September 12, 2012 16:22
Problem setting with chtmultiregionFoam Antonin OpenFOAM 10 April 24, 2012 10:50
Help with chtMultiRegionFoam jbvw96 OpenFOAM Running, Solving & CFD 2 December 26, 2010 18:16
Problem setting with chtmultiregionFoam Antonin OpenFOAM Running, Solving & CFD 3 July 20, 2009 07:52


All times are GMT -4. The time now is 03:08.