|
[Sponsors] |
Please give advice and help for the change the x y and z in U |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 17, 2005, 17:21 |
Dear all:
I want to modify
|
#1 |
Senior Member
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 17 |
Dear all:
I want to modify the x, y and z value of U. What do I do? Could you please give help? Thank you very much, xiang |
|
December 18, 2005, 09:35 |
If you mean the U components o
|
#2 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
If you mean the U components of the initial condition, open the
/case_name/0 directory and edit the U file according to your needs. Alberto
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
December 18, 2005, 09:38 |
Sorry, read "initial condition
|
#3 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Sorry, read "initial condition" as "initial or baoundary conditions".
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
December 18, 2005, 14:24 |
Dear Alberto Passalacqua:
T
|
#4 |
Senior Member
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 17 |
Dear Alberto Passalacqua:
Thanks a lot. I have read the initial value. I mean I want to change them after read in icoFoam.C. And I have add the code. But some errors is here when I run it. Could you please give more help. code: // modifying the value of the U volScalarField Ux = U.component(vector::X); volScalarField Uy = U.component(vector::Y); volScalarField Uz = U.component(vector::Z); const vectorField& centers = mesh.C().internalField(); forAll (centers, celli) { double angle = 180; Ux = Ux*Foam::sin(angle); Uy = Uy*Foam::cos(angle); Uz = 0; } error: --> FOAM FATAL ERROR : Different dimensions for = dimensions : [0 1 -1 0 0 0 0] = [0 0 0 0 0 0 0] From function dimensionSet::operator=(const dimensionSet& ds) const in file dimensionSet/dimensionSet.C at line 158. FOAM aborting Aborted Thank you very much. xiang |
|
December 19, 2005, 03:15 |
There are two major mistakes i
|
#5 |
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29 |
There are two major mistakes in the above code.
First, you are working on a copy of the U field. what you probably want is to create a reference. You should then use volScalarField& instead. Second, you are looping over the cells which probably means that you want to get the cell values,i.e Ux[celli] = U[celli].component(vector::X) etc... third, Xian you have posted an identical question on another topic (under a really useles topic since it applies on every post in here), this is REALLY bad. Now we have 2 forums to talk about the same thing and you have done this before: I am begging you on my knees. Please dont do it again or you will go on my ignore list. N |
|
December 19, 2005, 23:45 |
Dear Niklas Nordin:
Thanks
|
#6 |
Senior Member
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 17 |
Dear Niklas Nordin:
Thanks a lot. You are right. But I only worry nobody to see. Since somebody were noticed, I surely do as you said. Thanks again. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Could someone please give advice? | Frank Wedburn | Main CFD Forum | 11 | September 26, 2005 14:31 |
Can anybody give me advice | luckyluke | OpenFOAM Running, Solving & CFD | 11 | August 4, 2005 12:20 |
please give me some advice. | cfd lover | Main CFD Forum | 0 | November 5, 2004 04:50 |
give me some advice about compressible LES. | Bin Li | Main CFD Forum | 3 | September 19, 2003 14:01 |
Could you give me your advice? | Kim | FLUENT | 0 | March 8, 2002 06:44 |