|
[Sponsors] |
![]() |
![]() |
#1 |
Member
|
Hi all,
Can someone explain me what I messed up? I think I missunderstood something fundamental here. It compails without error. The UDF works without the loops. Also using only the inner loop is not working. Without the DEFINE_ONDEMAND all other UDFs in the file compiled work fine. When it runs I get this error: Error: received a fatal signal (Segmentation fault). Error: received a fatal signal (Segmentation fault). Error Object: #f DEFINE_ON_DEMAND(find_othercell) { Domain *d= Get_Domain(22); int ID = 12; Thread* f =Lookup_Thread(d, ID); // is pointer to thread face_t f; //face_t is an integer data type that identifies a particular face within a face thread. int n_faces; //number of faces thread_loop_f(f, d) { begin_f_loop(f, t) { n_faces = n_faces + 1; //C_CENTROID(air_c_centroid, c_cell, t_mark); } end_f_loop(f, t) } Message0("n_faces: %i \n", n_faces); } I think maybe the ID is wrong. I have a conformal mesh and there are multiple domains. 22 refers to one domain of my porous domain, that is connceted to other domains. ID 12 refers to the Intrior that represents the face between the domain(22) and domain(24). I tried 22 and 24 and both gives me same error. I think the "interior face" with ID 12 belongs to both of the domains but this is not possible?! If you can trust CFD-Post the name of 12 suggest, that it belongs to the domain 22 Last edited by schwaral; November 6, 2020 at 01:10. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
|
for example this is not working as well. I really do not understand why this error happens. All I can read in the internet, is that mostly a variable is not initialized or the UDM is not set or the UDF is not compiled correclty. But for me all this is not the case
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
|
for example this is not working as well.
DEFINE_ON_DEMAND(findothercell) { Domain *d= Get_Domain(24); int ID = 32; Thread* tf; face_t f; tf =Lookup_Thread(d, ID); begin_f_loop(f, tf) { printf("n_faces\n"); } end_f_loop(f, tf) } I really do not understand why this error happens. All I can read in the internet, is that mostly a variable is not initialized or the UDM is not set or the UDF is not compiled correclty. But for me all this is not the case |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 ![]() |
It can mean that domain 24 does not exist, or that cell zone 32 does not exist.
And my first guess would be domain 24... Why did you put 24 there? Where does this number come from? |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
|
It is what I read in the fluent setup tree under cell-zone-conditions. I thought the number there is the number of the domain?
|
|
![]() |
![]() |
![]() |
![]() |
#6 | |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 ![]() |
Quote:
The number 24 that you saw is the THREAD_ID of the interior, you don't need that here. Summary : just use GET_DOMAIN(1). |
||
![]() |
![]() |
![]() |
![]() |
#7 |
Member
|
aaah okay thanks! that makes sense now
|
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
|
I have another question regarding the internal walls. When I use c0=F_C0(f,ft) and loop over all faces of internal wall, Fluent finds all the cells on the left side of the internal wall. When I use c1=F_C1(f,ft) fluent finds all the nodes right of the internal wall.
I thougth that c1 should be the cell thread even further away from the boundary (2nd cell row next to boundary). Do you have an idea how to find the 2nd row of cells next to internal wall? I want to find the first two cells on the right side of internal wall. So somehow the c0 has to be on the other side (right) of the wall and c1 should be on the right side as well. Code:
begin_f_loop(f, tf) { /* c0 and t0 identify the adjacent cell */ c0 = F_C0(f, tf); c1 = F_C1(f, tf); t0 = THREAD_T0(tf); t1 = THREAD_T1(tf); C_UDMI(c0, t0, 0) = 1.0; C_UDMI(c1, t1, 1) = 2.0; } end_f_loop(f, tf) If I use interpolation for reading solution data, do I need to know the cell centroid or will Fluent automatically detect the cell centroid, when I give x,y,z of a cell? Last edited by schwaral; November 10, 2020 at 18:01. |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SHM Layer Addition Phase | dickcruz | OpenFOAM Meshing & Mesh Conversion | 4 | November 1, 2018 08:05 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library | aylalisa | OpenFOAM Installation | 23 | June 15, 2015 15:49 |
SigFpe when running ANY application in parallel | Pj. | OpenFOAM Running, Solving & CFD | 3 | April 23, 2015 15:53 |
Compressor Simulation using rhoPimpleDyMFoam | Jetfire | OpenFOAM Running, Solving & CFD | 107 | December 9, 2014 14:38 |