|
[Sponsors] |
![]() |
![]() |
#21 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 129 ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Srivaths,
OK, once in possession of source code, it made it a lot easier to figure out the problem. Attached is a working build and loading library, but I have not tested the boundary conditions themselves ![]() So the problem was rather simple:
![]() Best regards, Bruno
__________________
|
|
![]() |
![]() |
![]() |
![]() |
#22 |
Senior Member
Srivathsan N
Join Date: Jan 2013
Location: India
Posts: 101
Rep Power: 14 ![]() |
Hi Bruno,
Thank you so much for clearing that issue! ![]() To be frank I didn't quite understand what autoMap and rmap meant as I was simply doing changes to another derived BC. I have an idea now. I will have a look at the link you have given me and avoid mistakes like them in the future. (hopefully a few others as well) Wishing you in advance for a Happy 2014! Its almost 00:00 AM here! ![]()
__________________
Regards, Srivaths |
|
![]() |
![]() |
![]() |
![]() |
#23 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16 ![]() |
Greetings Bruno
Many thanks for your valuable information in this thread. I found the way in "tutorials/incompressible/simpleFoam/pitzDailyExptInlet"much simpler than groovy. I want to implement this approach for my case. I have a wedge-typed grid that the inlet velocity profile is known from another simulation. In the tutorial that you introduced, the velocities are identified for points along the min and maximum Z . But what about a wedge-typed grid? I have attached a pic of my grid. In Z direction only one cell occurs. If I define my velocities in Z=0 line, I have the values on cell centers (I think) or do I need to define the velocities on the points located on the upper and lower sides of the triangle? Does it differ? Would you PLZ hint me? Best, Bobi |
|
![]() |
![]() |
![]() |
![]() |
#24 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16 ![]() |
Greetings Bruno
About the method described in: "tutorials/incompressible/simpleFoam/pitzDailyExptInlet" I checked that whether I need to determine the velocity profile on the upper and lower sides of the inlet triangle or can I adjust it on the middle of the triangle i.e the location of Z=0 I found out that we can just pre-determine the values of the velocity only on the sides of the boundary. i.e. in my case on the upper and lower sides of the triangle. (for other condition, O.F. did not accept pre-determination of velocity by expressing error) Many thanks for your kind and always effective hints. ![]() ![]() Regards Bobi |
|
![]() |
![]() |
![]() |
![]() |
#25 | ||||
Senior Member
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 8 ![]() |
Hi wyldckat
I modify transitionalParabolicNonVelocity by replacing Quote:
Quote:
Quote:
Quote:
OpenFOAM-ext4.0, solver icofluid of fsiFoam. Last edited by Hgholami; March 22, 2019 at 00:49. |
|||||
![]() |
![]() |
![]() |
![]() |
#26 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 129 ![]() ![]() ![]() ![]() ![]() ![]() |
Quick answers:
The only thing that comes to mind is to try to use "scalar" to convert the value to actual scalar value type that OpenFOAM and foam-extend use: Code:
vectorField::operator=(n_*curMeanValue*(1.0 - pow(coord,scalar(1.7))));
Please refer to its actual project name: foam-extend |
|
![]() |
![]() |
![]() |
![]() |
#27 | |
Senior Member
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 8 ![]() |
Quote:
Dear wyldckat I use linux Ubuntu 16.04 with fsiFoam that downloaded from https://openfoamwiki.net/index.php/E...re_interaction the tutorial of hron&Turek that exist in fsiFoam folder is uses and transientParabolicVelocity in src folder of this toolkit modified with pow(a,n) (ex. 0<n<1 or any double value). I use your recommended code but still the problem exist. I saw in programmerGuide of openfoam that pow(a,n) work with n=0,1,2,..,4. |
||
![]() |
![]() |
![]() |
![]() |
#28 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 129 ![]() ![]() ![]() ![]() ![]() ![]() |
Quick answer: In the custom code you have, see this line?
Code:
// Calculate local 1-D coordinate for the parabolic profile scalarField coord = 2*((c - ctr) & y_)/((boundBoxMax_ - boundBoxMin_) & y_); Code:
Info << coord << endl; Run the case and you should see the list of values for "coord" before it crashes. See any negative values? If there are negative values, care to guess why the power to 1.7 of a negative value would be a bad idea in the real value spectrum? If you're not seeing it yet, square root can be defined as a power... "pow(value,0.5)". The cubic root can also be defined as a power: "pow(value,1.5)" Not seeing it yet? Negative numbers inside root operations will result in imaginary numbers, i.e. not real numbers but instead complex numbers, which is not supported in this particular situation... |
|
![]() |
![]() |
![]() |
![]() |
#29 |
Senior Member
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 8 ![]() |
You are right. the (c-ctr) give negative value. By converting negative values to positive values, the problem solved.
Thanks |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ship wave Boundary Condition in OpenFoam | keepfit | OpenFOAM Running, Solving & CFD | 1 | May 24, 2012 10:24 |
asking for Boundary condition in FLUENT | Destry | FLUENT | 0 | July 27, 2010 00:55 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 02:53 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 06:49 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 04:15 |