CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

NV_D crashing simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2022, 11:57
Default NV_D crashing simulation
  #1
Member
 
Chris
Join Date: Dec 2020
Posts: 45
Rep Power: 6
Pyrokrates is on a distinguished road
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
Pyrokrates is offline   Reply With Quote

Old   April 1, 2022, 00:08
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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);
your log doesn;t make any sense as that error could mean whatever.
most likely the problem in your case not in udf
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
udf crash, uds flux


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
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


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