|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Jun 2022
Posts: 27
Rep Power: 3 ![]() |
Hi guys,
I have define_init to read a text file and store my data in an array (global variable). This was working fine. In the same C file, I also used define_profile such that as long as my position coordinate matches, I would use the velocity at that coordinates. However, it was not working. Because I found out the arrays that stored my coordinates data was 0. I went to check on post on C program which I found the static and global variables were initialized to 0. Is there other ways that I can keep my values in array? Thank you. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Jun 2022
Posts: 27
Rep Power: 3 ![]() |
Hi guys,
The problem was solved without defining a global variable. However, it would still be great if I could learn how to update the values for global variable in the UDF. Thank you for reading this post and have a nice day! |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
courant number increases to rather large values | 6863523 | OpenFOAM Running, Solving & CFD | 22 | July 5, 2023 23:48 |
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" | bigphil | OpenFOAM CC Toolkits for Fluid-Structure Interaction | 686 | December 22, 2022 09:10 |
p_rgh initial residual no change with different settings | manuc | OpenFOAM Running, Solving & CFD | 3 | June 26, 2018 15:53 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 13:58 |
lid-driven cavity in matlab using BiCGStab | Don456 | Main CFD Forum | 1 | January 19, 2012 15:00 |