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

Flux of UDS

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By PierceH
  • 1 Post By vinerm
  • 1 Post By vinerm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2020, 16:47
Default Flux of UDS
  #1
Member
 
Pierce
Join Date: May 2019
Posts: 40
Rep Power: 7
PierceH is on a distinguished road
I have created a UDS which runs nicely, however I want to specify the flux at the walls of the aircraft wing to be the same as pressure flux. I used the following code:


DEFINE_PROFILE(UDSP, t, i)
{
real x[ND_ND]; /* this will hold the position vector */
real y, h;
face_t f;
real A[ND_ND];

begin_f_loop(f,t)
{
F_CENTROID(x, f, t);
F_AREA(A,f,t);
F_PROFILE(f, t, i) = A[0]*C_P_G(f,t)[0]+A[1]*C_P_G(f,t)[1]+A[2]*C_P_G(f,t)[2];
}
end_f_loop(f, t)
}



however I keep getting an error. Any help would be appreciated
Chris2337 likes this.
PierceH is offline   Reply With Quote

Old   April 23, 2020, 16:56
Default Error
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
What error do you get? If it's related to segmentation violation, then that's because pressure gradient is unavailable. You need to issue following command

sol set exp

And then answer yes to the question regarding keeping the memory from being freed.
PierceH likes this.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 23, 2020, 18:44
Default
  #3
Member
 
Pierce
Join Date: May 2019
Posts: 40
Rep Power: 7
PierceH is on a distinguished road
Quote:
Originally Posted by vinerm View Post
What error do you get? If it's related to segmentation violation, then that's because pressure gradient is unavailable. You need to issue following command

sol set exp

And then answer yes to the question regarding keeping the memory from being freed.



As soon as I choose it as the flux BC and select okay I receive the following error



Node 0: Process 28373: Received signal SIGSEGV.
PierceH is offline   Reply With Quote

Old   April 24, 2020, 04:44
Default Segmentation Violation
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
SIGSEGV implies segmentation violation. Most likely, pressure gradient is unavailable. The solution was mentioned in the previous post.
PierceH likes this.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 24, 2020, 15:56
Default
  #5
Member
 
Pierce
Join Date: May 2019
Posts: 40
Rep Power: 7
PierceH is on a distinguished road
I appreciate the suggestion but still no success! The same error persists
PierceH is offline   Reply With Quote

Old   April 24, 2020, 16:32
Default Gradient
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
I just noticed the bug. You are using C_P_G with f as its argument. That won't work. You have to use it like as follows

cell_t c;
Thread *ct;

ct = THREAD_T0(t);

And within the loop

c = F_C0(f, t);
C_P_G(c, ct)[0];
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 30, 2020, 02:25
Default
  #7
Member
 
Chris
Join Date: Dec 2018
Posts: 36
Rep Power: 7
Chris2337 is on a distinguished road
Watch your task manager when you do it, do you run out of RAM?
Chris2337 is offline   Reply With Quote

Reply


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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
UDS Flux Function Choice Yang Chung FLUENT 1 November 17, 2015 02:14
setting UDS Flux Andrew Garrard FLUENT 9 February 10, 2015 14:26
UDS Flux Function Problem sunbird04 FLUENT 6 April 28, 2014 03:58
Help with UDS FLUX Andrew Garrard FLUENT 2 February 14, 2005 06:47


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