|
[Sponsors] |
March 29, 2022, 11:57 |
NV_D crashing simulation
|
#1 |
Member
Chris
Join Date: Dec 2020
Posts: 45
Rep Power: 6 |
Hello,
I would like to implement a udf for my uds scalar transport. What I´m planning is to change the flux function as a function of a new calculated velocity (not the one of the fluid). No I have two problems with following code: Code:
#include "udf.h" DEFINE_UDS_FLUX(nabla_v_C, f, t, i) { real NV_VEC(psi), NV_VEC(A); // declaring vectors psi and A NV_D(psi, =, F_U(f,t), F_V(f,t), F_W(f,t)); // defining psi in terms of velocity field //NV_S(psi, *=, F_R(f,t)); // multiplying density to get psi vector //F_AREA(A,f,t); // face normal vector returned from F_AREA //return NV_DOT(psi,A); // dot product of the two returned return F_FLUX(f, t); } 1) If I use only the return of F_Flux(f, t), my program is working (code snippet from manual). But this is the calculation with fluid velocity... I want to change it like mentioned above. 2) When I tried the little more complex code from manual (all other lines in this function, I found out, that the NV_D line crashes my program instantly but I don´t know why... The solution is initialized and I have a solution of 200 time steps using porous media. The error in console and text file is following: Code:
Error [node 999999] [time 3/29/22 17:10:12] Abnormal Exit! Do you have any idea, why the code given by the manual does not work for me? And how can I replace the F_Flux function by my own to use my own velocity field? Thanks in advance Chris |
|
April 1, 2022, 00:08 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
code from manual should work well
how did you found out that the problem is in NV_D code above is doing nothing but Code:
return F_FLUX(f, t); most likely the problem in your case not in udf
__________________
best regards ****************************** press LIKE if this message was helpful |
|
Tags |
udf crash, uds flux |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
interFoam simulation crashing after ~3000 timesteps | ginop | OpenFOAM Running, Solving & CFD | 0 | January 30, 2022 01:58 |
Moving mesh simulation with mesh changes inside the solver | cgoessni | OpenFOAM Programming & Development | 2 | January 24, 2022 10:14 |
Surface Source - Fixed Temperature? | robtheslob | FloEFD, FloWorks & FloTHERM | 18 | May 12, 2017 03:28 |
RFR Gear Simulation Problem | JBirks92 | CFX | 7 | April 11, 2017 20:25 |
Source Term on Scalar Transport Equation - crashing simulation | alessio.nz | OpenFOAM | 19 | February 8, 2011 08:38 |