Guide: Writing Equations in LaTeX on the CFD Online Forums

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

 March 15, 2009, 15:58 Guide: Writing Equations in LaTeX on the CFD Online Forums #1 Administrator     Peter Jones Join Date: Jan 2009 Posts: 669 Rep Power: 10 This is a brief introduction about how to write equations in the CFD Online discussion forums. The equation functionality is based on LaTeX, a versatile mathematical typesetting system which is often used to write scientific papers and books. With LaTeX mathematical equations are written using normal text and this makes it very suitable for a text-based forum like this. The forum will automatically generate images of the LaTeX codes it finds and display them properly. LaTeX often gives very nice looking formulas. LaTeX can be a bit difficult to get started with, but those who know it tend to like it very much. Here is a simple example to illustrate how it works:If you in your message write: $a = \sqrt{\gamma R T}$ The forum will display: A usefull feature in the forum is that the LaTeX code used to write an equation can be seen when you hoover with the pointer over it. If you click on an equation a window will be opened displaying the LaTeX code used to write it. This makes it easy to learn from other people and to copy-and-paste equations from other posts. You can see how all equations on this page have been written either by hoovering over them with the pointer or by clicking on them! LaTeX can be used in two ways:Normal equations written separately away from normal text: $LaTeX code$ Inlined equations or symbols to be used inside a text: [imath]LaTeX code[/imath] The difference is that inlined equations are scaled to fit better in normal text whereas normal equations are scaled to look good when written separately. There is a special LaTeX reference tool avalable in the advanced editor which helps you to find the codes needed to write symbols, relations, operators etc. in LaTeX. To open the LaTeX reference click on the symbol to the right just above the editor window. Below follows a summary of the most commonly used symbols, relations, operators and functions as well as a few other frequently asked questions. To see how these symbols or equations were created just click on the one you are interested in and a window will be opened showing the code used to create it: Symbols Lowercase Greek letters: Capital Greek letters: Operators and relations: Misc: Bracketing - () {} [] You can simply write the brackets you want. To get the correct size of the brackets you sometimes have to use the \left and \right keywords in front of the bracket. For example, just writing parentheses gives , but with \left and \right keywords you would get . Exponents and Subscripts - $a_i^n$ - $x_{i+1}^{2^{n+1}}$ Functions - Fractions, Radicals, Integrals, Sums, Limits, ... - $\frac{1}{2}$ - $\sqrt{x+y}$ - $\sqrt[n]{x}$ - $\int^\infty_0 f(x) \, dx$ - $\oint_\Gamma f(x) \, ds$ - $\sum_{i=1}^{\infty}\frac{1}{i}$ - $\lim_{x\to\infty}\frac{1}{x}$ Trigonometric and Logarithmic Functions Please use these instead of simply typing in "sin". That ensures that the function is typeset properly with the right font and spacing. - $\cos^2 x + \sin^2 x = 1$ - $\tanh(c)$ - $\log n^2$ - $\ln(e)$ Spacing Sometime you may want to add extra horizontal space between characters. The following codes can be used to add extra space: a whitespace or no space at all gives a normal space () \quad - a large space to separate equations or write conditions (i = 1, 2, 3) on the same line () \; - a thick space () \: - a medium space () \, - a thin space () \! - a negative thin space () Fluid Dynamics and CFD Related Examples Navier-Stokes Equations using Tensor Notation: Equations: Reynolds Averaging: Boussinesq Eddy Viscosity Assumption: , or written more explicitly: Rhie-Chow Interpolation: Realisability and Schwarz' Inequality: chegdan, abbott.hn, sharonyue and 6 others like this.

 October 30, 2009, 02:51 test #2 New Member   Mohit Madan Join Date: Oct 2009 Posts: 4 Rep Power: 7 testing

 October 30, 2009, 03:03 #3 New Member   Mohit Madan Join Date: Oct 2009 Posts: 4 Rep Power: 7

 October 30, 2009, 03:04 #4 New Member   Mohit Madan Join Date: Oct 2009 Posts: 4 Rep Power: 7

 October 30, 2009, 03:06 #5 New Member   Mohit Madan Join Date: Oct 2009 Posts: 4 Rep Power: 7 chloegirly likes this.

 December 31, 2010, 02:03 Useful website for generating LaTeX equations #6 Senior Member   Real Name :) Join Date: Jan 2010 Location: United States Posts: 180 Rep Power: 7 Enjoy: http://www.codecogs.com/latex/eqneditor.php ComputerGuy Amir and DA6righthand like this.

 November 6, 2011, 23:56 #7 New Member   Sha Liu Join Date: Nov 2011 Posts: 1 Rep Power: 0 cool. i often use mathematica to write equations. then they can be transform to latex form.

 April 14, 2013, 16:11 #8 New Member   Stefan Bjornsson Join Date: Apr 2013 Posts: 7 Rep Power: 4 test test

 May 2, 2013, 22:15 #9 New Member   zdong Join Date: Aug 2011 Posts: 15 Rep Power: 5 let me have a try: and this " "inline equation

 June 4, 2013, 20:49 #10 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 675 Rep Power: 8 test

 October 24, 2013, 12:58 #11 New Member   Zhengbing Join Date: Apr 2013 Posts: 20 Rep Power: 4 test

 May 6, 2014, 21:18 #12 New Member   Betta Hwang Join Date: May 2014 Posts: 6 Rep Power: 3 why can't I use \^{\circ}C?

May 6, 2014, 21:22
#13
New Member

Betta Hwang
Join Date: May 2014
Posts: 6
Rep Power: 3
Quote:
 Originally Posted by Betta why can't I use \^{\circ}C?
sorry. it works now.

 December 9, 2014, 07:38 #14 Senior Member   Bobi Join Date: Oct 2012 Posts: 286 Rep Power: 5 Last edited by babakflame; December 9, 2014 at 08:44.

 January 26, 2015, 10:21 #15 New Member   Join Date: Jan 2015 Posts: 12 Rep Power: 2 Last edited by Gary51075607; January 26, 2015 at 22:01.

 January 29, 2015, 21:51 #16 New Member   Join Date: Jan 2015 Location: Beijing,China Posts: 12 Rep Power: 2 Just to have a try

 May 25, 2015, 13:49 #17 New Member   Ali Kadar Join Date: Oct 2014 Location: Delft Posts: 24 Rep Power: 2 __________________ A good solution is one which does justice to the inner nature of the problem- Cornelius Lanczos in a letter to Albert Einstein on March 9, 1947 Last edited by flowAlways; May 25, 2015 at 17:42.

 June 13, 2015, 10:18 #18 New Member   Justin Join Date: Jan 2015 Posts: 15 Rep Power: 2 I cannot figure this out. Where is my syntax error? Here's what I typed between the bracketed math and /math: \alpha\frac{\partial^2x}{\partial \xi^2}-2\beta \frac{\partial ^2x}{\partial \xi \partial \eta}+\gamma \frac{\partial ^2x}{\partial\eta^2}=0 \alpha\frac{\partial^2y}{\partial\xi^2}-2\beta\frac{\partial^2y}{\partial\xi\partial\eta}+ \gamma\frac{\partial^2y}{\partial\eta^2}=0 Here the images of what displays on the codehogs.com online eqn editor: $\alpha\frac{\partial^2x}{\partial&space;\xi^2}-2\beta&space;\frac{\partial&space;^2x}{\partial&space;\xi&space;\partial&space;\eta}+\gamma&space;\frac{\partial&space;^2x}{\partial\eta^2}=0$ $\alpha\frac{\partial^2y}{\partial&space;\xi^2}-2\beta&space;\frac{\partial&space;^2y}{\partial&space;\xi&space;\partial&space;\eta}+\gamma&space;\frac{\partial&space;^2y}{\partial\eta^2}=0$ I don't understand why I'm getting an error on the forum. It's frustrating.

 June 15, 2015, 16:39 #19 Administrator     Peter Jones Join Date: Jan 2009 Posts: 669 Rep Power: 10 Seems like the LaTeX functionality is broken after the server move on June 5. We will investigate and post a message in this thread once LaTeX is working again.

June 15, 2015, 16:58
#20
New Member

Justin
Join Date: Jan 2015
Posts: 15
Rep Power: 2
Quote:
 Originally Posted by pete Seems like the LaTeX functionality is broken after the server move on June 5. We will investigate and post a message in this thread once LaTeX is working again.
Thanks! I ended up posting equations as images obtained from the online LaTeX editor on codecogs.com but I found out I can post a maximum of 10 images.

 Tags equations, formulas, latex, symbols

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post pete Site Help, Feedback & Discussions 6 July 20, 2015 07:20 Guillermo Marraco CFD-Wiki 2 September 11, 2006 18:12 Hong Main CFD Forum 1 March 31, 2000 10:27 chaker Main CFD Forum 3 October 27, 1999 09:19

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