|
[Sponsors] |
March 31, 2016, 09:56 |
Declare a zone/thread as a liquid
|
#1 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Good day,
In my udf code, under DEFINE_INIT(my_initilize,d), can I declare C_UDMI(c,t,i) = 1.0 as liquid thread , without using FLUID_THREAD_P(t) macro? Thank you so much. |
|
March 31, 2016, 11:21 |
|
#2 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
I am not sure about what you need. Can you explain what is your problem so we will have a better chance to help you.
|
|
March 31, 2016, 11:28 |
|
#3 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Hi Bruno Machado,
I am appreciate for your quick response. Actually, in my case, I need to compile the code since I have this miscellaneous macro i.e. FLUID_THREAD_P(t). However, my computer has problem to compile the code and certainly the code cannot be simply interpret. Therefore, I have decided to get rid of this term FLUID_THREAD_P(t) and just simply make looping on UDMI(c,t,i) equal to 1.0 (to declare it is a liquid region). This is part of my code: DEFINE_INIT(initialize,d) { cell_t c; Thread *t; int i; thread_loop_c(t,d) /* Loop over all cell threads in domain */ { if (FLUID_THREAD_P(t)) { begin_c_loop(c,t) /* Loop over all cells in a cell thread*/ { C_UDMI(c,t,4) = 1.0; /* Liquid region */ C_UDMI(c,t,0) = Latent_Heat; C_UDMI(c,t,1) = Latent_Heat; C_UDMI(c,t,2) = 1.0; C_UDMI(c,t,3) = 1.0; } end_c_loop(c,t) } } } Is it possible to just put the number 1.0 to indicate it is liquid? Thank you so much. |
|
March 31, 2016, 11:37 |
|
#4 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
Quote:
I am just wondering if you need to use the FLUID_THREAD_P(t). In the cell zone conditions in Fluent, you can define if you have a fluid or a solid zone. In case you are working with both (fluid+particles) the FLUID_THREAD_P(t) becomes interesting, otherwise, you can simply use the thread returned by the Fluent. |
||
March 31, 2016, 11:46 |
|
#5 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Dear Bruno Machado,
Thank you for your explanation. Somehow my compilation code has showed error message (not compatible with 64 bits environment). I wonder if you can give an opinion on how to get correct steps to compile the codes with the miscellaneous macro, FLUID_THREAD_P(t)? Thank you =) |
|
March 31, 2016, 11:48 |
|
#6 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
I would advise you to fix the problem you have with "FLUID_THREAD_P(t)", and don't invent your own method that will have many more problems. Which compilation errors do you get? |
||
March 31, 2016, 11:52 |
|
#7 | |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
Quote:
|
||
March 31, 2016, 11:53 |
|
#8 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Hi Pakk.
Thank you for your response. Appreciate it. My compilation error gives me: does not compatible with 64 bits environment. Previously, when I interpret the code, it does showed >> structure references is not implemented on line 41: FLUID_THREAD_P(t). Earlier, I assume that number 1.0 is stored in Fluent library as liquid thread. However, I am wrong with that. Sorry with that. |
|
March 31, 2016, 11:57 |
|
#9 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Quote:
|
||
March 31, 2016, 12:01 |
|
#10 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Hi pakk,
This is the result of my compilation.. Error: The UDF library you are trying to load (libudf) is not compiled for 2d on the curent platform (win64) Thank you. |
|
April 1, 2016, 03:23 |
|
#11 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
That is not the error you get when you compile, but the error you get when you load.
Please show the error that you get when you compilee (click 'build'). |
|
April 4, 2016, 10:59 |
|
#12 | |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Quote:
when I tried to open it gave me this error: The UDF library you are trying to load (libudf) is not compiled for 2d on the current platform (win64). The system cannot find the path specified. How to fix this issue? Thank you so much |
||
April 4, 2016, 11:07 |
|
#13 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
As I said before: that is not the error you get when you compile, but the error you get when you load.
Read it carefully: "The UDF library you are trying to load (libudf) is not compiled". It is the error that you will get when you try to load a UDF that is not compiled. Why is the UDF not compiled? I don't know, and it is impossible to see from this error. You will have to show the error that you get when you try to compile. So please show the error that you get when you compile (what is shown after you click 'build'). |
|
April 4, 2016, 11:29 |
|
#14 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Hi pakk,
May I ask, why this error occur during load? This is the one I face. Not an error during compile. So, my code cannot be compile to 'done'. Thank you. |
|
April 4, 2016, 11:35 |
|
#15 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
I don't know.
And until you share the text shown on your screen when you click 'build', I can not help you further. You say that there is no error there, but you might not read it correctly. (And given that you already misread my question here three times, it is not impossible that you just overlooked the error.) |
|
April 4, 2016, 23:51 |
|
#16 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Good day,
This is my error message shown in this window The UDF library you are trying to load (libudf) is not compiled for 2ddp on the current platform (win64). The system cannot find the file specified. C:\Users\sfahmi\Desktop\proposal defence\sas(1e-6)\solidification\libudf\win64\2ddp\libudf.dll |
|
April 5, 2016, 04:01 |
|
#17 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Please don't repeat the text that is shown when you click 'load'. That is not important.
When you are ready to share the text that is shown when you click 'build', let me know. |
|
April 6, 2016, 10:19 |
|
#18 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
Dear sir,
please help me................ because my UDF code is in 32 bits |
|
April 6, 2016, 10:20 |
|
#19 |
Member
mimi
Join Date: Mar 2016
Posts: 33
Rep Power: 10 |
And , I don't have a good compiler to match with a new fluent version
|
|
April 6, 2016, 10:45 |
|
#20 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
I really want to help you. But I can not see what is shown on your screen...
What you should do: 1. Open Fluent. 2. Load your model. 3. Go to the user-defined-functions, compilation option. 4. Select your source file. 5. Click 'build'. 6. Select the text shown in the text user interface. 7. Press control and C. 8. Go to this screen, and click 'reply'. 9. Press control and V. 10. Click 'Submit reply'. If you don't do this, I can not help you. |
|
Tags |
#udf #liquid #thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] OpenFOAM 2.3.x on Mac OS X 10.10.1 Installation Errors | Petru | OpenFOAM Installation | 15 | December 29, 2015 13:51 |
[OpenFOAM.org] OpenFOAM 2.3.1 installation on SUSE Linux Enterprise 12 | harsha_kulkarni | OpenFOAM Installation | 17 | November 16, 2015 04:06 |
[OpenFOAM.org] Installation problem 2.4.0 on Centos 6.6 | luke_skywalker | OpenFOAM Installation | 8 | November 13, 2015 09:15 |
Sgimpi | pere | OpenFOAM | 27 | September 24, 2011 08:57 |
Ld_library_path | scottneh | OpenFOAM | 9 | November 21, 2009 10:15 |