CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Could anybody help the trouble of the modifying the U

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 26, 2006, 16:49
Default Hi friend, I have a trouble
  #1
Senior Member
 
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 8
liugx212 is on a distinguished road
Hi friend,

I have a trouble which I want to modify the U. I mean I want to keep the initial U to a new variable and after solver, I like to add this quatity to U again. But there are some errors. Could you please help me.

volScalarField Uin = UEqn.A();
...
U += Uin;

Errors:

icoFoam.C:120: error: no match for ˜operator+=U in ˜U += Uin"
/home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/GeometricField.C:1238: note: candidates are: void Foam::GeometricField<type,>::operator+=(const Foam::GeometricField<type,>&) [with Type = Foam::vector, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/GeometricField.C:1238: note: void Foam::GeometricField<type,>::operator+=(const Foam::tmp<foam::geometricfield<type,> >&) [with Type = Foam::vector, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/home/liu/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/GeometricField.C:1238: note: void Foam::GeometricField<type,>::operator+=(const Foam::dimensioned<type>&) [with Type = Foam::vector, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
make: *** [Make/linuxGcc4Opt/icoFoam.o] Error 1
liugx212 is offline   Reply With Quote

Old   February 27, 2006, 06:03
Default In your code: volScalarFiel
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
In your code:

volScalarField Uin = ...


in createFields.H:

volVectorField U(..)

You are trying to assign one (field of scalars) to the other (field of vectors)?
mattijs is offline   Reply With Quote

Old   February 27, 2006, 11:23
Default Hi Mattijs Janssens: Thanks
  #3
Senior Member
 
Guoxiang
Join Date: Mar 2009
Posts: 109
Rep Power: 8
liugx212 is on a distinguished road
Hi Mattijs Janssens:

Thanks. I mean that I want to keep my initial U to Uin and then add this Uin to new U (after end of the iteration). But the U is the vector. So I am not sure where define them and how to operating. Could you please give some help?

Thanks a lot.
Guoxiang
liugx212 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
modifying under-relaxation factors pieizquierdo (miguel) FLUENT 7 July 30, 2011 08:05
Modifying an arc in GAMBIT? Jake FLUENT 0 April 1, 2008 16:23
Could anybody help the trouble of the modifying the U liugx212 OpenFOAM Running, Solving & CFD 0 February 26, 2006 17:48
Modifying solverslibraries Kaushik Balakrishnan (Balakrishnan) OpenFOAM Running, Solving & CFD 1 January 31, 2005 10:52
modifying commercial codes Richard Carroni Main CFD Forum 1 October 15, 1998 06:38


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